怎么使背景图片全网页显示
1、添加style标签:<style type="text/css" ></style>
2、添加选择器,例如:<style type="text/css" >body { }</style>
3、添加图片路径,例如:<style type="text/css" >body {background-image:url("/images/background.jpg"); }</style>
4、取消图片的重复排列:<style type="text/css" >body {background-image:url("/images/background.jpg");background-repeat:no-repeat ; }</style>
5、设置背景图片大小:<st鲻戟缒男yle type="text/css" >body {background-image:ur造婷用痃l("/images/background.jpg");background-repeat:no-repeat ;background-size:100% 100%; }</style>
6、固定图片:<style type="text/css" >body {background-image:url("/images/background.jpg");background-repeat:no-repeat ;background-size:100% 100%;background-attachment: fixed; }</style>
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:51
阅读量:83
阅读量:77
阅读量:77
阅读量:51