css .xx xx{}问题

html-css027

css .xx xx{}问题,第1张

.style uuu {font-size = 10px;}

首先这个里面的属性就写错了,应该是下面这样吧

.style uuu {font-size:10px}

.style uuu {font-size:10px} 这是一种后代选择器的模式,uuu这应该指的是页面中的各种元素,即 p、div、ol、ul、li、h1等等。

即可以像这样 .style p{font-size:10px} 这种形式应该是比较吻合的。

也就是在 class="style" 的元素后代中 所有 p 元素的 font-size 为 10px 。

我给楼主看了一下```你要的效果没说清楚`如果想显示出下拉列表直接删掉 #menu li dd{display:none

}

就可以了。如果想鼠标移动后,出现下拉列表,我没看到楼主定义这个类型,所以给楼主一个我以前写的,仅供参考。

.imcm ul,.imcm li,.imcm div,.imcm span,.imcm a{text-align:leftvertical-align:toppadding:0pxmargin:0list-style:none outside noneborder-style:nonebackground-image:noneclear:nonefloat:nonedisplay:blockposition:staticoverflow:visibleline-height:normal}

.imcm li a img{display:inlineborder-width:0px}

.imcm span{display:inline}

.imcm .imclear,.imclear{clear:bothheight:0pxvisibility:hiddenline-height:0pxfont-size:1px}.imcm .imsc{position:relative}.imcm .imsubc{position:absolutevisibility:hidden}.imcm li{list-style:nonefont-size:1pxfloat:left}.imcm ul ul li{width:100float:left !important}

.imcm a{display:blockposition:relative}

.imcm ul .imsc,.imcm ul .imsubc {z-index:10}

.imcm ul ul .imsc,.imcm ul ul .imsubc{z-index:20}

.imcm ul ul ul .imsc,.imcm ul ul ul .imsubc{z-index:30}

.imde ul li:hover .imsubc{visibility:visible}

.imde ul ul li:hover

.imsubc{visibility:visible}

.imde ul ul ul li:hover

.imsubc{visibility:visible}

.imde li:hover ul .imsubc{visibility:hidden}

.imde li:hover ul ul .imsubc{visibility:hidden}

.imde li:hover ul ul ul .imsubc{visibility:hidden}

.imcm .imea{display:blockposition:relativeleft:0pxfont-size:1pxline-height:1pxheight:0pxwidth:1pxfloat:right}

.imcm .imea span{display:blockposition:relativefont-size:1pxline-height:0px}.dvs,.dvm{border-width:0px}/*\*//*/.imcm .imea{visibility:hidden}/**/</style><!--[if IE]><style type="text/css">.imcm .imea span{position:absolute}.imcm .imclear,.imclear{display:none}.imcm{zoom:1} .imcm li{curosr:hand} .imcm ul{zoom:1}.imcm a{zoom:1}</style><![endif]--><!--[if gte IE 7]><style type="text/css">.imcm .imsubc{background-image:url(ie_css_fix)}</style><![endif]--><!--end-->

<!--[imstyles] *** Infinite Menu Styles: Keep this section in the document head for full validation. -->

<style type="text/css">

/* --[[ Main Expand Icons ]]-- */

#imenus0 .imeam span,#imenus0 .imeamj span {background-image:url(bg-daohangS.jpg)width:1pxheight:12pxleft:0pxtop:0pxbackground-repeat:no-repeatbackground-position:top left}

#imenus0 li:hover .imeam span,#imenus0 li a.iactive .imeamj span {background-image:url(bg-daohangS.jpg)background-repeat:no-repeatbackground-position:top left}

/* --[[ Sub Expand Icons ]]-- */

#imenus0 ul .imeas span,#imenus0 ul .imeasj span {background-image:url(stub_arrow_right.gif)width:6pxheight:8pxleft:0pxtop:3pxbackground-repeat:no-repeatbackground-position:top left}

#imenus0 ul li:hover .imeas span,#imenus0 ul li a.iactive .imeasj span {background-image:url(stub_arrow_right.gif)background-repeat:no-repeatbackground-position:top left}

/* --[[ Main Container ]]-- */

#imouter0 {background-color:#95D4CCborder-style:noneborder-color:#CCCCCCborder-width:1pxpadding:0pxmargin:0px}

/* --[[ Sub Container ]]-- */

#imenus0 li ul {background-color:#95d4ccborder-style:solidborder-color:#687a54border-width:1pxpadding:5px 8px 5px 5pxmargin:0px}

/* --[[ Main Items ]]-- */

#imenus0 li a, #imenus0 .imctitle {height:16pxbackground-color:#95D4CCcolor:#000text-align:leftfont-family:Arialfont-size:12pxfont-weight:normaltext-decoration:none padding:3px 6px 1pxmargin:0px 5px 0px 0px}

/* [hover] - These settings must be duplicated for IE compatibility.*/

#imenus0 li:hover>a {background-color:#5B9890text-decoration:none}

#imenus0 li a.ihover, .imde imenus0 a:hover {background-color:#95d4cctext-decoration:none}

/* [active] */

#imenus0 li a.iactive {}

/* --[[ Sub Items ]]-- */

#imenus0 ul a, #imenus0 .imsubc li .imctitle {height:autobackground-color:transparentcolor:#000text-align:leftfont-size:11pxfont-weight:normaltext-decoration:noneborder-style:solidborder-color:#95d4ccborder-width:1px 0pxpadding:2px 5pxmargin:0px}

/* [hover] - These settings must be duplicated for IE comptatibility.*/

#imenus0 ul li:hover>a {background-color:#5B9890text-decoration:noneborder-color:#687a54}

#imenus0 ul li a.ihover {background-color:#5B9890text-decoration:noneborder-color:#687a54}

/* [active] */

#imenus0 ul li a.iactive {}