css header text and underline overlap

 <view class="text">
        <text class="textCon">标题</text>
        <text class="borderText"></text>
  </view>
.text {
  font-size: 36rpx;
  color: rgba(51, 51, 51, 1);
  position: relative;
}

.textCon {
  position: relative;
  z-index: 999;
}

.borderText {
  width: 100%;
  height: 10rpx;
  background: #1694cd;
  position: absolute;
  bottom: 0;
  index-Z : 0 ; 
  left : 0 ; 
} 

results show

 

 

 

 



 

Guess you like

Origin www.cnblogs.com/caoyuna/p/11528833.html