html - CSS 怎么筛选没有id的某元素
黄舟
黄舟 2017-04-17 11:12:19
0
4
633
<td onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)"
onkeyup="Menu_Key(event)" id="menun0">
    <table class="menu_static_item menu_4" cellpadding="0" cellspacing="0"
    border="0" width="100%">
        <tbody>
            <tr>
                <td style="white-space:nowrap;">
                    <a class="menu_1 menu_static_item menu_3" href="javascript:__doPostBack('menu','1')"
                    style="border-style:none;font-size:1em;">
                        Monthly Report
                    </a>
                </td>
            </tr>
        </tbody>
    </table>
</td>
<td style="width:3px;">
</td>
<td onmouseover="Menu_HoverStatic(this)" onmouseout="Menu_Unhover(this)"
onkeyup="Menu_Key(event)" id="menun1">
    <table class="menu_static_item menu_4" cellpadding="0" cellspacing="0"
    border="0" width="100%">
        <tbody>
            <tr>
                <td style="white-space:nowrap;">
                    <a class="menu_1 menu_static_item menu_3" href="javascript:__doPostBack('menu','2')"
                    style="border-style:none;font-size:1em;">
                        YTD Report
                    </a>
                </td>
            </tr>
        </tbody>
    </table>
</td>
<td style="width:3px;">
</td>

我想将没有id的td的宽度减为零。

或者有谁知道怎么去除ASP.NET的Menu控件生成的这些多余td元素 ?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(4)
左手右手慢动作

ASP.NET doesn’t know CSS but it works
td {display:none}
td[id] {display:table-cell}

PHPzhong

Use css priority to implement, and use different selectors to define the same element

大家讲道理

http://www.w3school.com.cn/css/css_selector_descendant.asp,我想w3c是是回答你的最好方式,在这里不应该贴代码为具体的问题,这不适合啊

Peter_Zhu

CSS3 has a not selector, for example:

p:not(#p1){
   ##css
}

is to select all p elements but exclude the p element with id p1

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template