网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

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

时间: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>

怎么使背景图片全网页显示
© 2025 小知经验
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com