移动文本,同时 ::before 元素保持不变

问题描述 投票:0回答:1
html css bootstrap-4 bootstrap-5
1个回答
0
投票

不要使用

margin
,而是使用
padding
,因为这不会影响伪元素的位置。

.underline-text {
  padding-left: 2rem !important;
}

© www.soinside.com 2019 - 2024. All rights reserved.