B2主题美化-创建圈子按钮

创建圈子按钮美化了一下,加了一个蓝色背景和动态边框效果

操作如下:

B2PRO主题版本:版本:3.5.6

再主题css或者子主题css添加如下代码

.circle-widget-button .text {
   display: flex;
   align-items: center;
   justify-content: center;
   height: 3vh;
}
.circle-widget-button .text {
  border: 0px;
  background: #2d79fc;
  text-transform: uppercase;
  color: #fff;
  font-weight: bold;
  position: relative;
  outline: none;
  padding: 10px 20px;
  box-sizing: border-box;
  border-radius: none;
}
button::before, button::after {
  box-sizing: inherit;
  position: absolute;
  content: '';
  border: 2px solid transparent;
  width: 0;
  height: 0;
}
button::after {
  bottom: 0;
  right: 0;
}
button::before {
  top: 0;
  left: 0;
}
.circle-widget-button .text:hover::before, button:hover::after {
  width: 100%;
  height: 100%;
}
.circle-widget-button .text:hover::before {
  border-top-color: #1E90FF;
  border-right-color: #2d79fc;
  transition: width 0.3s ease-out, height 0.3s ease-out 0.3s;
}
.circle-widget-button .text:hover::after {
  border-bottom-color: #1E90FF;
  border-left-color: #2d79fc;
  transition: border-color 0s ease-out 0.6s, width 0.3s ease-out 0.6s, height 0.3s ease-out 1s;
}
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容