Answers for "background url"

CSS
124

css background image

background-image: url("image.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
Posted by: Guest on April-07-2020
18

html background image

<!-- Code by Scratchy -->
<!-- Twitter: @S_cratchy-->

<head>
  <style>
    body {
      background-image: url(https://wallup.net/wp-content/uploads/2019/09/110394-cats-grey-kittens-fluffy-fat-grass-animals-cat-kitten-baby-cute-748x468.jpg) 
    }
  </style>
  
  <body>
    You have set the background image!
    
    
    
  </body>
Posted by: Guest on February-03-2020
0

background url with color css

background: linear-gradient(0deg, rgba(2,173,231,0.5), rgba(2,173,231,0.5)), url(images/mba-grid-5px-bg.png) repeat;
Posted by: Guest on September-01-2020
3

adding background image css

/* Answer to: "adding background image css" */

/*
  The background-image property sets one or more background images
  for an element.

  By default, a background-image is placed at the top-left corner
  of an element, and repeated both vertically and horizontally.

  Tip: The background of an element is the total size of the
  element, including padding and border (but not the margin).

  Tip: Always set a background-color to be used if the image is
  unavailable.
*/

/* Set a background-image for the <body> element: */

body {
 background-image: url("paper.gif");
 background-color: #cccccc;
}

/* Set two background images for the <body> element: */

body {
  background-image: url("img_tree.gif"), url("paper.gif");
  background-color: #cccccc;
}
Posted by: Guest on April-26-2020
1

background in css

/* There are several ways of setting a background, like in HTML or CSS
	(I advise you to set it in CSS) You can set a colour or image with
	the same attribute: */

/* Setting the colour in a div, body, html (html is the whole page),
	class, and id: */
div, body, html, .myClass, #myId {
	background-color: grey;
}
/* Setting the image: */
div {
	background: url("img.jpg");
}
/* If you want to call an image from a specific directory use a '/'.
	For example, the image is in a folder called 'Images' (the HTML
	and CSS files have to be in the same folder as the 'Images folder') */
div {
	background: url("Images/img.jpg");
}
Posted by: Guest on December-07-2020

Browse Popular Code Answers by Language