我不知道如何让加号图标覆盖整个 div 的可点击距离。我只能让加号可以点击。如何将 div 完全划分并将加号放在右边? 我怎样才能给div全宽但在右下角加号? 任何帮助将不胜感激。谢谢。
.bg {
width: 100%;
background-color: red;
}
.br {
position: absolute !important;
bottom: 5px;
right: 5px;
}
.plus:hover {
color: green;
}
.bg:hover {
color: green;
}
<div class="bg">
<div class="plus br">
<span>+</span>
</div>
</div>
最佳答案
这应该可以,试试看;
<a href="#">
<div style="text-align:right">
+
</div>
</a>
关于html - 带有图标的整个 div 应该是可点击的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42993197/