zoukankan      html  css  js  c++  java
  • 纯css实现互动清单

    如图,点击每条信息可以实现删除这条信息的效果。

    <!DOCTYPE html>
    <html lang="en" xmlns="http://www.w3.org/1999/html">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            .cb {
                display: none;
            }
            .mark {
                position: relative;
                display: inline-block;
                 20px;
                height: 20px;
                border: 2px solid transparent;
            }
        .mark:before {
        content: "";
        display: none;
        position: absolute;
        top:50%;
        left: 25%;
        height: 4px;
         8px;
        border: solid black;
        border- 0 0 4px 4px;
        -webkit-transform: rotate(-45deg);
        -moz-transform: rotate(-45deg);
        -ms-transform: rotate(-45deg);
        -o-transform: rotate(-45deg);
        transform: rotate(-45deg);
    }/*画√,这是呈现在页面的钩钩*/
            .cb:checked~ .mark:before {
                display: block;
            }
            .cb:checked~ .con {
                text-decoration: line-through;
            }
        </style>
    </head>
    <body>
    <fieldset>
        <label>
            <input type="checkbox" class="cb" checked>
            <span class="mark"></span>
            <span class="con">this is a test</span>
        </label>
    <br>
        <label>
            <input type="checkbox" class="cb">
            <span class="mark"></span>
            <span class="con">this is a test</span>
        </label>
        <br>
        <label>
            <input type="checkbox" class="cb">
            <span class="mark"></span>
            <span class="con">this is a test</span>
        </label>
    </fieldset>
    </body>
    </html>

     

  • 相关阅读:
    算术运算符
    短路运算
    基本运算符
    类型转换
    数据类型讲解
    关键字
    河北省重大技术需求征集八稿第六天
    河北省重大技术需求征集八稿第五天
    河北省重大技术需求征集八稿第四天
    河北省重大技术需求征集八稿第三天
  • 原文地址:https://www.cnblogs.com/iriliguo/p/6807631.html
Copyright © 2011-2022 走看看