【问题标题】:HTML CSS Border Linear Gradient CornersHTML CSS 边框线性渐变角
【发布时间】:2021-07-30 09:04:41
【问题描述】:

您好,我在调整线性渐变边框时遇到问题。它看起来像这样:

我希望它看起来像这样 ^ 。 谁能帮忙。

.bot-right {
  position: relative;
  height:400px;
}
.bot-right:before, .bot-right:after {
  content: "";
  position: absolute;
  bottom: -3px;
  right: -40px;
  
}
.bot-right:before {
  top: -3px;
  width: 3px;
  background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#009ee3), to(transparent));
  background-image: -webkit-linear-gradient(transparent, #009ee3);
  background-image: -moz-linear-gradient(transparent, #009ee3);
  background-image: -o-linear-gradient(transparent, #009ee3);
}
.bot-right:after {
  left: -3px;
  height: 3px;
  background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#009ee3), to(transparent));
  background-image: -webkit-linear-gradient(right, #009ee3, transparent);
  background-image: -moz-linear-gradient(right, #009ee3, transparent);
  background-image: -o-linear-gradient(right, #009ee3, transparent);
}
<div class="bot-right "></div>

【问题讨论】:

    标签: html css gradient


    【解决方案1】:

    一个简单的边框图像,可以做到

    .bot-right {
      position: relative;
      height:400px;
      border:3px solid;
      border-image: linear-gradient(90deg,transparent, #009ee3) 3;
    }
    <div class="bot-right "></div>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多