如何使一个箭头指向HTML / CSS中的一个部分后
问题描述:
我想在< section>
元素的底部添加一个向下箭头。它应该在底部的中间。但不幸的是我还没有找到任何方法如何做到这一点与CSS。
I want to make a down arrow on the bottom of a <section>
element. It should be in the middle of the bottom. But unfortunately I have not found any methods how to do this with css. And I can't figure it out myself.
这是我的html:
<div class="down-btn">
<svg class="down-btn-img">
<polyline points="0,0 50,50 100,0" />
</svg>
</div>
答
我刚刚做了边距的事,到底部 bottom:0
I just did the thing with margins and I attached it to the bottom with bottom: 0
.down-btn {
bottom: 0;
position: absolute;
min-width: 30px;
margin: 0px calc(50vw - 15px);
}