CSS实现扑克牌! <br /> body { background: #DDDDDD; overflow: hidden; } <br /> body .fire { color: #FF0000; } <br /> p { <br /> background: #FFFFFF; border: 1px solid #CCCCCC; <br /> border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; <br /> box-shadow: 5px 5px 5px #CCCCCC; -webkit-box-shadow: 5px 5px #CCCCCC; -moz-box-shadow: 5px 5px #CCCCCC; <br /> filter: progid:DXImageTransform.Microsoft.Shadow(color='#CCCCCC', Direction=135, Strength=5); <br /> font-size: 25px; text-align: center; <br /> height: 30px; width: 600px; margin: -35px -300px; padding: 10px 15px; position: absolute; bottom: 50px; left: 50%; z-index: 99; <br /> } <br /> ul { <br /> background: #FFFFFF; border: 1px solid #CCCCCC; <br /> background:-moz-linear-gradient(top, #FFFFFF, #DDDDDD); background:-webkit-gradient(linear,0 0, 0 100%, from(#FFFFFF), to(#DDDDDD)); <br /> border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; <br /> box-shadow: 5px 5px 5px #CCCCCC; -webkit-box-shadow: 5px 5px #CCCCCC; -moz-box-shadow: 5px 5px #CCCCCC; <br /> filter: progid:DXImageTransform.Microsoft.Shadow(color='#CCCCCC', Direction=135, Strength=5); <br /> font-size: 50px; <br /> margin: 0; padding: 0 15px; position: absolute; right: 20px; top: 15px; z-index: 99; <br /> } <br /> ul li { <br /> display: inline; <br /> list-style-type: none; <br /> } <br /> ul li a { <br /> color: #000000; <br /> display: block; float: left; padding: 0 10px; <br /> text-decoration: none; <br /> } <br /> .base { <br /> background: #FFFFFF; border: 1px solid #CCCCCC; color: #000000; <br /> background:-moz-linear-gradient(top, #FFFFFF, #DDDDDD); background:-webkit-gradient(linear,0 0, 0 100%, from(#FFFFFF), to(#DDDDDD)); <br /> border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; <br /> box-shadow: 5px 5px 5px #CCCCCC; -webkit-box-shadow: 5px 5px #CCCCCC; -moz-box-shadow: 5px 5px #CCCCCC; <br /> filter: progid:DXImageTransform.Microsoft.Shadow(color='#CCCCCC', Direction=135, Strength=5); <br /> height: 360px; top: 50%; margin-top: -180px; width: 260px; left: 50%; margin-left: -130px; z-index: 9; <br /> cursor: pointer; font-size: 50px; text-decoration: none; <br /> padding: 15px 0 0 25px; position: absolute; <br /> } <br /> strong { <br /> font-size: 250px; <br /> position: absolute; left: 50%; top: 50%; margin-top: -160px; <br /> -webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.4)), to(rgba(0,0,0,1))); <br /> } <br /> em { <br /> font-size: 40px; font-style: normal; <br /> display: block; margin-bottom: -15px; <br /> } <br /> label span { <br /> -webkit-transform: rotate(-180deg); -moz-transform: rotate(-180deg); -o-transform: rotate(-180deg); filter: <br /> <br /> <br /> progid:DXImageTransform.Microsoft.BasicImage(rotation=2); <br /> position: absolute; bottom: 15px; right: 25px; <br /> } <br /> #spades strong { margin-left: -68px; } #spades em { margin-left: 0; } <br /> #hearts strong { margin-left: -70px; } #hearts em { margin-left: 1px; } <br /> #clubs strong { margin-left: -80px; } #clubs em { margin-left: 3px; } <br /> #diamonds strong { margin-left: -60px; } #diamonds em { margin-left: -2px; } <br /> fieldset { display: none; } <br /> fieldset:target { display: block; } <br /> fieldset:target .card+label { -webkit-animation-name: scaler; -webkit-animation-duration: 1.75s; -webkit-animation-iteration-count: 1; } <br /> fieldset:target .card:checked+label { -webkit-animation-name: effectx; -webkit-animation-duration: 3s; -webkit-transform: scale(0); } <br /> .close { <br /> background: #DDDDDD; cursor: default; <br /> left: 0; top: 0; position: absolute; height: 100%; width: 100%; z-index: 1; <br /> text-indent: -999em; <br /> } <br /> @-webkit-keyframes scaler { from { -webkit-transform: scale(0); } to { -webkit-transform: scale(1); } } <br /> @-webkit-keyframes effectx { <br /> from { -webkit-transform: rotateX(0deg); } <br /> to { -webkit-transform: scale3d(1.2, 1.2, 1.2) rotateX(-90deg) translateZ(500px) rotate(180deg); -webkit-animation-duration: 30s; } <br /> } <br /> <br /> function bootup(){ <br /> if (location.hash == "") { location.hash="#spades"; } var tds = document.getElementsByTagName("a"); direct(); <br /> for( var x=0; x < tds.length; x++ ){tds[x].onclick = function(){setTimeout(direct, 1);};} <br /> } <br /> function direct(){ <br /> /*@cc_on @if (@_jscript_version > 5.6) <br /> var counted = document.getElementsByTagName("fieldset"); <br /> for( var x=0; x < counted.length; x++ ){ counted[x].style.display = "none" } <br /> document.getElementById(location.hash.substr(1)).style.display = "block"; <br /> @end @*/ <br /> } <br /> window.onload=bootup; <br /> ♠ ♥ href="#clubs">♣ ♦ A♠♠A♠ checked="checked" />Spades A♥♥A♥ checked="checked" />Hearts A♣♣A♣ checked="checked" />Clubs title="This is the Ace of Diamonds!">A♦♦A♦ name="diamond" value="cancel" checked="checked" />Diamonds http://www.999jiujiu.com/