css – 表内有不同风格的表?

如何为两个表格单元格制作两种不同的样式,其中一个单元格位于另一个表格内?

我有两种CSS样式:

table.style1 { /* any styles */}
table.style1 td { /* any styles */}

table.style2 { /* any styles */}
table.style2 td { /* any styles */ }

代码我有这样的somting:

<table class="style1">
   <tr>
      <td>
         <table class="style2">
            <tr><td>bla bla<td></tr>
         </table>
      </td>
   <tr>
</table>

结果是 – 所有< td>第二个表格(带有style2)的表格单元格与style1 …!

当桌子里面有桌子时,如何制作两个不同的css窗框?

解决方法

试试这个代码.我相信它运作正常.
table.style1 { /* any styles */}

table.style1 td { /* any styles */}

table.style1 table.style2 { /* any styles */}

table.style1 table.style2 td { /* any styles */}

相关文章

Css3如何实现鼠标移上变长特效?(图文+视频)
css3怎么实现鼠标悬停图片时缓慢变大效果?(图文+视频)
jquery如何实现点击网页回到顶部效果?(图文+视频)
css3边框阴影效果怎么做?(图文+视频)
css怎么实现圆角边框和圆形效果?(图文+视频教程)
Css3如何实现旋转移动动画特效