css伪元素实现

2018-08-15  本文已影响0人  zy懒人漫游
.box{
  width: 150px;
  height: 150px;
  background: #f39700;;
  border-radius: 50%;
  text-align: center;
  line-height: 150px;
  position: relative;
  font-size: 40px; 
  margin: 50px auto;
  color:#fff;
  font-style: italic; //字体倾斜
}

.box::before{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: '';
  width: 200px;
  height:  200px;
  background-color: #fff;
  border-radius:50%;
  z-index: -1;
  border: 2px solid #f39700;;
}

image.png
上一篇 下一篇

猜你喜欢

热点阅读