如何定义字段集边框颜色? [英] How can I define fieldset border color?

查看:127
本文介绍了如何定义字段集边框颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要设置字段集的边框颜色。我使用类,但这是不能正常工作,因为我想删除字段集默认边框颜色。
那么如何使用字段集边框颜色。

I want to set border color of field set. I am using class but this is not working properly because i want to remove fieldset default border color. so how can I use fieldset border color.

<fieldset class="field_set">
    <legend>box</legend>
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
           <tr>
               <td>&nbsp;</td>
           </tr>
      </table>
</fieldset>

css

.field_set{
 border-color:#F00;
}


推荐答案

和IE 8.但也许你需要改变 border-style

It does appear red on Firefox and IE 8. But perhaps you need to change the border-style too.

.field_set{
  border-color: #F00;
  border-style: solid;
}

<fieldset class="field_set">
  <legend>box</legend>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>&nbsp;</td>
    </tr>
  </table>
</fieldset>

这篇关于如何定义字段集边框颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆