Heim  >  Artikel  >  Web-Frontend  >  求解如何在表格边框中设置颜色_html/css_WEB-ITnose

求解如何在表格边框中设置颜色_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:55:101445Durchsuche

效果如图:


回复讨论(解决方案)

<style type="text/css">*{ padding:0; margin:0;}table{ border-collapse:collapse; background:#0C9;}th{ width:50%; padding:5px 3px;}td{ padding:5px 3px;}td p{ text-indent:2em;}table th,table td{ border:2px solid #FFF;}.space{ border:2px solid #009; width:500px; margin:20px auto;}.space h3{ height:24px; line-height:24px; background:#03C; color:#FFF; margin:2px 2px 0 2px; padding-left:20px;}</style><div class="space">	<h3>本站导航</h3>    <table width="100%">      <tr>        <th scope="col">网页制作</th>        <th scope="col">留言板</th>      </tr>      <tr>        <td><p>这是一个讲述网页制作方面的栏目,着重讲述了网页制作的一般技能和方法。</p></td>        <td>请留下您的金言。</td>      </tr>      <tr>        <th scope="col">网页制作</th>        <th scope="col">留言板</th>      </tr>      <tr>        <td><p>这是一个讲述网页制作方面的栏目,着重讲述了网页制作的一般技能和方法。</p></td>        <td>请留下您的金言。</td>      </tr>    </table></div>

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn