加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

HTML – 如何启用双虚线边框?

发布时间:2020-12-14 18:45:08 所属栏目:资源 来源:网络整理
导读:当我输入这个: style .tavit{ width:400px; height:300px; background-color:yellow; border:dashed; /*First I applied - border:dashed double (In order to get a double dashed border - but it didn't work for some reason*/ border-style:double; ma
当我输入这个:
<style>
        .tavit{
            width:400px;
            height:300px;
            background-color:yellow;
            border:dashed; /*First I applied - border:dashed double (In order to get a double dashed border - but it didn't work for some reason*/
            border-style:double;
            margin:auto;
            font-size:medium;
            text-align:right;
        }
        .adom {
            color: red;
            font-size: xx-large;
            text-align: center;
        }
    </style>

什么都行不通就像它甚至是其中一个.我错过了什么?
谢谢

解决方法

您可以使用一个div简单地修复此问题,您可以使用轮廓和边框,然后使用outline-offset属性
.test {
  background:white;
  padding:15px;
  border:1px dashed #000;
  outline:1px dashed #000;
  outline-offset:-5px;
}
<div class="test">see this</div>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读