css - 如何让CSS轮廓转 Angular ?

标签 css outline

我有代码可以为我提供这些

enter image description here

CSS 代码:

  .about-best-big-vector-right {
  width: 1380px;
  float: right;
  border-top: 140px solid #272838;
  border-left: 75px solid transparent;
  position: relative;
  outline: 3px solid #eda225;
  outline-offset: .3rem;
  -moz-outline-radius-bottomleft: 2em;
}

HTML 代码:<div class="about-best-big-vector-right"></div>

但我想实现这一目标,但无法将 Angular 设置为左下角? enter image description here

最佳答案

不要使用边框,使用倾斜变换:

.box {
  overflow: hidden;
  width: 40%;
  margin-left: auto;
}

.box::before {
  content: "";
  display: block;
  margin-right: -10px;
  height: 150px;
  background: #000 content-box;
  padding: 5px;
  border: 4px solid orange;
  transform-origin: top;
  transform: skewX(30deg);
}
<div class="box">

</div>

关于css - 如何让CSS轮廓转 Angular ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66114987/

相关文章:

javascript - 禁用的属性不适用于 Xhtml

html - 为什么这个简单的 HTML CSS 文本笔画不起作用?

google-chrome - Chrome 默认焦点轮廓

javascript - CSS matrix3d 计算不对,但为什么呢?

javascript - 导航栏中的 jQuery 文本装饰下划线

html - 使用负 z-index 时灰度效果不起作用

css - HTML/CSS - 水平居中宽度不断变化的 div

CSS 大纲无法在 Firefox 中正确呈现

outline - 给定非凸多边形中的大量顶点,我如何找到边?

testing - cucumber 测试 - 休息