开发者社区 问答 正文

这个效果怎么通过css实现?

screenshot
如何通过css用代码实现,

展开
收起
杨冬芳 2016-06-08 14:48:19 1802 分享 版权
1 条回答
写回答
取消 提交回答
  • IT从业

    css:

    .remem {
      display: none;
    }
    .remem + label {
      background:  url(../images/btn11.png) no-repeat;
      background-size: 100%;
      display: inline-block;
      position: relative;
      float: left;
      margin-top: 3px;
      width: 14px;
      height: 14px;
      margin-right: 10px;
    }
    .menlogin label{
      margin-left: 68px;
    }
    .remem:checked + label:after {
      content: ' ';
      width: 14px;
      height: 14px;
      position: absolute;
      background: url(../images/btn11-1.png) no-repeat;
      background-size: 100%;
    }
    

    html:

    <input type="checkbox" name="" value="" checked="checked" class="remem" id="wtsx-radio-2">
     <label for="wtsx-radio-2"></label>
     <span>记住密码</span>
     
    2019-07-17 19:31:58
    赞同 展开评论
问答分类:
问答标签:
问答地址: