俄罗斯anjelica写真:大家帮帮忙拉 CSS的问题!!50分
来源:百度文库 编辑:神马品牌网 时间:2024/05/10 22:39:03
<style>
div{color:#F00;}
.class1{background:#DDD;}
#joy{border:solid 1px #999;}
</style>
<div>标签的效果被应用</div>
<div class="class1">类和标签的效果被应用</div>
<div class="class1" id="joy">类、标签和ID的效果被应用</div>
通过这个例子应该可以理解类、标签、ID的使用了。还要多加揣测。
body{background:url(Images/1.jpg) no-repeat center center fixed;}
当然如果给所有的div或别的什么的都可以这样应用
div{background:url(Images/1.jpg) no-repeat center center fixed;}
ID:
#joy{background:url(Images/1.jpg) no-repeat center center fixed;}
都是没有问题的。