css图片路径

1 例如 目录结构
-- index.html
-- css/main.css
-- images/1.jpg ; 2.jpg; 3.jpg

index.html引用main.css
在main.css 引用images目录里的1.jpg
background: #6293bb url(../images/shadow.png) *** 正确
background: #6293bb url(images/shadow.png) *** 错误
总结,写css里的图片路径,url是图片针对目前main.css的位置


2
两个相同的class之间用 逗号 阁开

例如: td.read_forum, td.topic_icon{ 注意2个class之间用逗号*/
background-color:#EFEFEF;
}

3 写class中间用空格号
例如: <table id="forum_main">
<thead>
<tr>
<td colspan="2" class="first_col" style="width: 620px;">论坛</td>
<td style="width: 60px;">主题</td>
</tr>
</thead>
<tbody>
</table>

说明:
table#forum_main thead td { //中间用空格
background-image: url(../images/bg_cel2.gif);
color: #ffa34f;
border-top: 1px solid white;
}

4 哪里的class,是用点号

table#forum_main thead td.first{ //td后面用点号
border-left: 1px solid white;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值