【问题标题】:why css borders not shown carefully?为什么没有仔细显示css边框?
【发布时间】:2015-09-10 14:26:32
【问题描述】:

我用 css 编写了一个箭头。 代码

border-style: solid;
border-width: 0 0 25px 4px ;
border-color: transparent transparent transparent #cacaca;

镜头:

ایگل دیزاینطراحی سایت

斜线不是平滑线。

你的想法是什么?

【问题讨论】:

  • 请创建一个 sn-p(使用您的 html + css 代码),以便我们更好地帮助您
  • 您使用的箭头比例大约为 (6:1) 25px 高度到 4px 宽度会产生不均匀的线条。

标签: image css border smooth


【解决方案1】:

不确定为什么它会不平滑,可能是您可能需要长手指定边框。

例如border-top: 20px solid transparent

css技巧在css triangles上有一篇不错的文章

【讨论】:

    【解决方案2】:

    试试这个

    border-top: 25px solid $pink;
    border-right: 50px inset transparent;
    border-left: 50px inset transparent;
    

    FIDDLE DEMO

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-18
      • 1970-01-01
      • 2022-11-29
      • 1970-01-01
      • 2011-10-21
      • 1970-01-01
      相关资源
      最近更新 更多