button.點擊效果


1、

  1.1、ZC:知識點:

    (1)、css ":active"選擇器            (http://www.w3school.com.cn/cssref/selector_active.asp

    (2)、css box-shadow的使用(0px 0px 50px #F60 inset)    (http://www.w3school.com.cn/cssref/pr_box-shadow.asp

  1.2、代碼:

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>button點擊效果</title>

    <style type="text/css">
    <!--

        .clicked    { box-shadow: 0px 0px 50px #F60 inset; color:#fff; }
        #btn :active{ box-shadow: 0px 0px 50px #F60 inset; color:#fff; }

    -->
    </style>

</head>
<body>

    <input id="btn" type="button" value="button(1)"  />
    <br/><br/>
    <input type="button" onclick="this.className = this.className=='clicked' ? '' : 'clicked'" value="button(2)" />

</body>
</html>

 

2、

3、

4、

5、

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM