求助一个CSS问题 - Web 开发 / HTML(CSS)
我这样写就没问题 #cp1 img{magin:5px;} #cp2 img{magin:5px;} #cp3 img{magin:5px;} 我想精简代码,用下面的写法,就出错了,是不是语法有问题? #cp1,#cp2,#cp3 img{magin:5px;}
是语法有问题,你的写法相当于是: #cp1{magin:5px;} #cp2{magin:5px;} #cp3 img{magin:5px;} 所以要注意书写的格式!引用 我这样写就没问题 #cp1 img{magin:5px;} #cp2 img{magin:5px;} #cp3 img{magin:5px;} 我想精简代码,用下面的写法,就出错了,是不是语法有问题? #cp1,#cp2,#cp3 img{magin:5px;}引用 #cp1 img,#cp2 img,#cp3 img{magin:5px;} #1 一楼正解 End_rbody_65468433//--> 该回复于2010-07-06 08:35:33被版主删除 对我有用[0] 丢个板砖[0] 引用 举报 管理 TOP zhd20 (zhd20) 等 级: #5楼 得分:0回复于:2010-05-16 18:34:40 你上面的应用错了哦 应该 #cp1 img,#cp2 img,#cp3 img{magin:5px;} ,逗号,,, #cp1,#cp2,#cp3 img这个和#cp1 img,#cp2 img,#cp3 img完全不同,LZ要注意了 你的写法有误引用 #cp1 img,#cp2 img,#cp3 img{magin:5px;} 这个对的,不能简写。 引用 1 楼 aspwebchh 的回复: #cp1 img,#cp2 img,#cp3 img{magin:5px;}引用 是语法有问题,你的写法相当于是: #cp1
相关问答:
如题,在WINDOWS底下的CODE会,但在LINUX下不知道如何实现,JS的代码应该是不一样的。 求教。 分不够再加。 http://topic.csdn.net/u/20100113/08/17ba1e71-4c33-43f6-91a5-0e031c86e5ed.html linux ......
各位大哥大街们,我想把HTML转换成PDF,使用的是FOP,但是报错: java.lang.ClassCastException: org.apache.fop.layout.BlockArea cannot be cast to org.apache.fop.layout.AreaContainer at com.test.Html2Pdf ......
display:inline-block; overflow:hidden;(网络上查找是影藏溢出,但是测试起来感觉不太明白) position:relative;(绝对定位,不知道对不对) position:absolute; 这四个属性在CSS里面出现频率比较高,高手指点 ......
VBScript code: while x<100 response.write "<div>xxxx</div>" x= x+1 wend 循环输出 html代码 代码总是以下面的形式那样 在一行上的 HTML code: <div>xxxx</div> ......
我通过 BACKGROUND: url(images/s.gif) no-repeat 0px 0px; 调整到图片的位子正好的时候。可是图片会根据浏览器窗口的大小不固定。 请看图 A:hover { COLOR: #1e50c1; TEXT-DECORATION: underline; ......