【问题标题】:Selecting all images in a <td> tag and disabling them选择 <td> 标记中的所有图像并禁用它们
【发布时间】:2010-03-26 08:16:48
【问题描述】:

我的 HTML 看起来像这样:

<table class="disabled">
   <tr>
      <td>
         <input blah blah>

      </td>
      <td>
         <img id="reallyLongASP.NetID" etcetc/>
      </td>
   </tr>
</table>

总之,我想设置可见性:隐藏在&lt;img&gt; 上。我可以使用 ASP.Net 提供的疯狂 id 禁用,但想做一个影响&lt;table&gt;中每个控件的一般性声明@

提前感谢您的帮助,

【问题讨论】:

    标签: asp.net html css css-selectors


    【解决方案1】:

    如果我理解正确,您只需选择表中指定类的所有图像:

    table.disabled img { visibility:hidden }
    

    【讨论】:

    • 谢谢,我想太多了。
    • @Cen 不用担心,我们都会遇到这种情况:)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多