티스토리 뷰

HTML&CSS

adding images

뚜비콩 2017. 9. 4. 09:15

1. background-size:

  1. cover - expands the image as large as possible to cover the full width or height of a container. If the dimensions of the container (say, a div) are larger than the dimensions of the image, the image will become distorted. This value is best for images that don't communicate important content to the user, like background images.

  2. contain - expands the image as large as possible, but the image will be letterboxed, which means it won't cover the full width or height of a container.


*font-family: 'Amatic SC', cursive; //이쁘다


2. background-attachment:

  1. scroll - this value allows the image to move up and down as a user scrolls on the web page (this is the default value).
  2. fixed - this value pins the image's position on the page.


3. background-image: -webkit-linear-gradient(#000000, #000000)




'HTML&CSS' 카테고리의 다른 글

CSS TIP  (0) 2017.11.06
jQuery / DOM (JavaScripts and the dom)  (0) 2017.09.04
Tables  (0) 2017.09.04
html&css : Layout  (0) 2017.08.31
html&css : Box Model - Content Box  (0) 2017.08.30
댓글