【问题标题】:Custom css for border-bottom用于边框底部的自定义 css
【发布时间】:2015-11-01 18:23:55
【问题描述】:

我已将 css 应用于 this thing,但有什么方法可以让我对 this type 进行 css 处理?

意思是减小边界线的底部?

【问题讨论】:

    标签: css border customization


    【解决方案1】:

    看看有没有帮助。

    p {
      position: relative;
      z-index: 1;
      width: 30px;
      background: red;
      padding: 10px;
      color: #fff;
    }
    p:before {
      content: "";
      position: absolute;
      left: 5px;
      bottom: 0;
      width: 80%;
      border-bottom: 4px solid black;
      height: 1px;
    }
    <p>
      hello
    </p>

    【讨论】:

    • 你是对的,这可以做到,但悬停时它不起作用,但会看到,它真的很有帮助
    • 使用p:hover:before自定义黑色边框。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-20
    • 2012-12-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-19
    相关资源
    最近更新 更多