如何给你的网页添加一个不错的背景?
很简单,只需要在你的网站代码里面加入以下代码即可实现,
<style>html{background:url(http://av.oxx0.com/1/demo_bg.png)}</style>
z这里你可以给背景添加一些css属性比如宽度和高度
css代码是background-size:100% auto;
这里的100%就是宽度 auto就是高度。
background:center;就是居中显示。
如何让它固定背景不跟随鼠标滑动呢?
就是 background-attachment: fixed;
background-repeat: no-repeat;这个属性表示不拉伸