怎么使背景图片全网页显示

时间:2024-10-21 02:24:01

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>

怎么使背景图片全网页显示
© 手抄报圈