gpt4 book ai didi

html - 使用 css 带阴影的三 Angular 形

转载 作者:太空狗 更新时间:2023-10-29 15:17:24 24 4
gpt4 key购买 nike

CSS

.caret-bottom
{
display: inline-block;
width: 0;
height: 0;
vertical-align:top;
content: "";
border-top: 9px solid #FFFFFF;
border-right: 7px solid transparent;
border-left: 7px solid transparent;
margin-top: 13px;
margin-left: 4px;
}

HTML代码

<div class="caret-left"></div>

我需要像 3D 效果一样的三 Angular 形底部阴影。

最佳答案

.triangle {
width: 100px;
height: 100px;
position: relative;
overflow: hidden;
box-shadow: 0 16px 10px -17px rgba(0, 0, 0, 0.5);
}
.triangle:after {
content: "";
position: absolute;
width: 50px;
height: 50px;
background: #999;
-webkit-transform: rotate(45deg);
top: 75px;
left: 25px;
box-shadow: -1px -1px 10px -2px rgba(0, 0, 0, 0.5);
}
<div class="triangle"></div>

演示

http://jsfiddle.net/w9Zgc/

关于html - 使用 css 带阴影的三 Angular 形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16183536/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com