gpt4 book ai didi

html - 如何删除伪 `after` 内容中我丑陋的箭头标记的底部

转载 作者:太空宇宙 更新时间:2023-11-03 20:28:26 25 4
gpt4 key购买 nike

body{
background:#fff;
}

.triangle {
position: relative;
margin: 3em;
padding: 1em;
box-sizing: border-box;
background: #fff;
box-shadow: 0px 0 5px 0 rgba(0, 0, 0, 0.4);
border-radius:5px;
}
.triangle::after{
content: "";
position: absolute;
width: 0;
height: 0;
margin-left: -0.5em;
top: 0;
right: 1%;
box-sizing: border-box;
border: 0.75em solid black;
border-color: transparent transparent ;
transform-origin: 0 0;
transform: rotate(135deg);
box-shadow: 0px 0px 5px rgba(0, 0, 0, .5);
}
<div class="triangle">This is a CSS3 triangle with a proper box-shadow!</div>

最佳答案

你能用这段代码替换“.triangle::after”并检查它是否解决了你的问题吗?

.triangle::after {
content: "";
position: absolute;
width: 0;
height: 0;
margin-left: -0.5em;
top: 0;
right: 1%;
box-sizing: border-box;
border: 0.75em solid black;
border-color: transparent transparent;
transform-origin: 0 0;
transform: rotate(135deg);

background: #fff;
box-shadow: -2px 2px 2px 1px rgb(233, 233, 233);
}

关于html - 如何删除伪 `after` 内容中我丑陋的箭头标记的底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48169039/

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