首页 > 其他 > 详细

star score

时间:2015-10-31 15:43:36      阅读:165      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <style type="text/css" media="screen">
    /*关键点:float: right
            -webkit-appearance: none
            :checked 选择符
            同级元素选择符 ~*/
    .demo{
        float: left;
    }
    .demo input{
        float: right;
        margin: 0;
        width: 44px;
        height: 44px;
        border: 0 none;
        outline: none;
        -webkit-appearance: none; /*remove default style*/
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        background: url(a.png) 0 -44px no-repeat;
        opacity: .3;

        transition: all 100ms linear;
    }
    .demo input:hover,
    .demo input:hover ~ input{
        opacity: 1;
    }
    .demo input:checked,
    .demo input:checked ~ input{
        background-position: 0 0;
        opacity: 1;
    }
    </style>
</head>
<body>
    <div class="demo">
        <input type="radio" name="star" value="" placeholder="">
        <input type="radio" name="star" value="" placeholder="">
        <input type="radio" name="star" value="" placeholder="">
        <input type="radio" name="star" value="" placeholder="">
        <input type="radio" name="star" value="" placeholder="">
    </div>
</body>
</html>

技术分享

star score

原文:http://www.cnblogs.com/jiujiaoyangkang/p/4925573.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!