Home  >  Article  >  Web Front-end  >  css中的background属性_html/css_WEB-ITnose

css中的background属性_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:32:301320browse

第一次写博客,我就写写今天在编写网页的过程中,对background的两种运用,一是background中的线性渐变,对背景的渐变我其实是很少使用的,所以今天在写的时候我用css3的帮助手册,background: linear-gradient(to bottom,#0e7bef,#0d73da);这个是对背景颜色从上到下的一种线性渐变(linear-gradient),两个颜色参数是从第一个颜色参数渐变到第二个颜色参数。二是对background: #0e7bef url(../img/sprites.auto.26d10b5b.png)center 0 no-repeat;这样的一种写法,呈现出的是在一片蓝色的背景中间会有泛白的效果,使蓝色背景会很好看,我第一次这样使用,它是把一个背景颜色和背景图结合起来使用的,图片是一个全透明的什么都没有,center 意思就是背景图像横向和纵向居中,由于图片很大所以不需要平铺(no-repeat)。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn