zoukankan      html  css  js  c++  java
  • button不能添加伪类元素

    今日试了一下button添加伪类元素,结果是不行的前后都叠加在一起

    html代码:

    <button class="form_btn" formType="submit">开始择日</button>

    css样式:

    .form_btn::before{ content: ""; position: absolute; top:0; background:yellow; 14px; height: 38px; background-size: 100%; left: 0;}
    .form_btn::after{ content: ""; position: absolute; top: 0; right: 0;  background: #000;  20px; height: 38px;}

    把button换成view就没问题

  • 相关阅读:
    053335
    053334
    053333
    053332
    053331
    053330
    053329
    053328
    053327
    053326
  • 原文地址:https://www.cnblogs.com/huanghuali/p/9227332.html
Copyright © 2011-2022 走看看