首页 相关文章 使用CSS固定背景

使用CSS固定背景

使用CSS可以固定背景,格式如下:

标签名{background-attachment:参数}

参数:

fixed:页面滚动时,背景固定;

scroll:页面滚动时,背景滚动。

实例:

html
style type="text/css"
!--
p.1{ background-attachment:fixed; background-repeat:no-repeat;background-image:url(mgc.jpg);font-size:100mm}
p.2{ background-attachment:scroll; background-repeat:no-repeat;background-image:url(mgc.jpg);font-size:100mm}
--
/style
head
titleCSS/title
/head
body

p class="1"fixed/p
p class="2"scroll/p

/body
/html[ 查看全文 ]

2016-02-19 标签:

使用CSS固定背景的相关文章

如果您有什么好的建议或者疑问,可以联系我们。 商务合作QQ:3272218541;3282258740。商务合作微信:13319608704;13319603564。

加好友请备注机构名称。让我们一起学习、一起进步tulaoshi.com 版权所有 © 2019 All Rights Reserved. 湘ICP备19009391号-3

微信公众号

手机页面
收藏网站 回到头部