<%@ Page language="C #"autoeventwireup="true"codefile="Default3.aspx.cs"inherits="DEFAULT3"%><! DOCTYPE html>"http://www.w3.org/1999/xhtml">"Server"> <meta http-equiv="Content-type"Content="text/html; Charset=utf-8"/> <title></title> <script src="Js/jquery-1.7.2.min.js"></script> <style type="Text/css"> *{padding:0px; margin:0px; Box-sizing:border-box; }. db {z-index: -; Position:absolute; Margin:0Auto; Top:-5px; height:40px; width:300px; Background-color: #FFC125; Border-radius:5px; }. dbback {top:300px; position:relative; Margin:0Auto; Background-color: #CDC9C9; height:40px; width:300px; Border-radius:5px; }. d1 {border-radius:5px; Margin-left:5px; Margin-top:9px; float: Left; height:27px; width:27px; Background-color: #CDC9C9; }. d2 {text-Align:center; Line-height:27px; Color:white; Border-radius:5px; Margin-top:-5px; height:27px; width:27px; Background-color: #FF4500; Cursor:pointer; } </style>"Form1"runat="Server"> <div> <divclass="Dbback"> <divclass="DB"> <divclass="D1"> <divclass="D2">1</div> </div> <divclass="D1"> <divclass="D2">2</div> </div> <divclass="D1"> <divclass="D2">3</div> </div> <divclass="D1"> <divclass="D2">4</div> </div> <divclass="D1"> <divclass="D2">5</div> </div> </div> </div> </div> &L T;/form></body>"Text/javascript"> $(". D2"). MouseDown (function () {$ ( This). CSS ("margintop","0px"); }); $(". D2"). MouseUp (function () {$ ( This). CSS ("margintop","-5px"); });</script>
JQuery Simple 3D button effect