CSS内容在“外部”之前;方框“;

CSS内容在“外部”之前;方框“;,css,Css,有件事我不明白 当我创建一个像 <style> .vorher{ text-align: center; border: 1px solid red; max-width: 100px; margin-left: auto; margin-right: auto; } .vorher:before{ content: "\2192"; } </style> <div class="row"&g

有件事我不明白

当我创建一个像

<style>
.vorher{
  text-align: center;
   border: 1px solid red;
   max-width: 100px;
   margin-left: auto;
   margin-right: auto;
}
.vorher:before{
  content: "\2192";
}
</style>

<div class="row">

<div class="half">
  <p id="button1" class="vorher"><a href="#">Some Text</a>
  </p>
</div>
<div class="half">
<p id="button2" class="vorher"><a href="#">Some Text</a>
  </p>
</div>
</div>


您可以将
变换:平移
与绝对定位一起使用:

.row{
位置:相对位置;
宽度:100%;
显示器:flex;
}
.一半{
位置:相对位置;
宽度:50%;
边框:1px纯绿色;
}
沃赫先生{
位置:相对位置;
文本对齐:居中;
边框:1px纯红;
最大宽度:100px;
左边距:自动;
右边距:自动;
}
沃赫:以前{
位置:绝对位置;
左:0;
转化:translateX(-100%);
内容:“\2192”;
}