时间:2021-07-01 10:21:17 帮助过:40人阅读
1 2 3 4 5CSS3 KeyBoard 6 7 8 9 10
CSS代码:
1 @font-face { 2 font-family: 'icomoon'; 3 src:url('http://upimage-img.stor.sinaapp.com/icomoon.eot'); 4 src:url('http://upimage-img.stor.sinaapp.com/icomoon.eot?#iefix') format('embedded-opentype'), 5 url('http://upimage-img.stor.sinaapp.com/icomoon.woff') format('woff'), 6 url('http://upimage-img.stor.sinaapp.com/icomoon.ttf') format('truetype'), 7 url('http://upimage-img.stor.sinaapp.com/icomoon.svg#icomoon') format('svg'); 8 font-weight: normal; 9 font-style: normal; 10 } 11 12 body { 13 background-color: #000; 14 } 15 16 ul, li { 17 list-style: none; 18 margin: 0; 19 padding: 0; 20 -webkit-user-select: none; 21 -moz-user-select: none; 22 -ms-user-select: none; 23 user-select: none; 24 } 25 26 ul { 27 width: 704px; 28 background: linear-gradient(60deg, rgba(158,180,185,1), rgba(222,157,193,1) 50%, rgba(169,156,173,1) 100%); 29 padding-left: 8px; 30 border-radius: 5px; 31 padding-top: 10px; 32 } 33 34 ul::after { 35 content: ""; 36 display: table; 37 clear: both; 38 } 39 40 li { 41 font-family: "Vrinda"; 42 width: 54px; 43 height: 50px; 44 line-height: 50px; 45 background-color: rgba(255,255,255,.9); 46 border-radius: 5px; 47 float: left; 48 text-align: center; 49 font-size: 24px; 50 vertical-align: text-top; 51 margin-right: 10px; 52 margin-bottom: 10px; 53 box-shadow: 0 1px 0 rgba(0,0,0,.5); 54 cursor: pointer; 55 position: relative; 56 } 57 58 li:active { 59 box-shadow: inset 0 1px 0 rgba(0,0,0,.5); 60 top:1px; 61 } 62 63 .icon { 64 font-family: "icomoon"; 65 } 66 67 li:nth-child(11), li:nth-child(21), li:nth-child(22), 68 li:nth-child(32), li:nth-child(33), li:nth-child(35), li:nth-child(36) { 69 background: rgba(188,188,188,.5); 70 font-size: 20px; 71 } 72 73 li:nth-child(12) { 74 margin-left: 20px; 75 } 76 77 li:nth-child(21) { 78 width: 98px; 79 } 80 81 li:nth-child(n+22) { 82 width: 52px; 83 } 84 85 li:nth-child(32) { 86 width: 74px; 87 } 88 89 li:nth-child(33) { 90 width: 176px; 91 } 92 93 li:nth-child(34) { 94 width: 362px; 95 } 96 97 li:nth-child(35) { 98 width: 74px; 99 }100 101 li:nth-child(31), li:nth-child(30) {102 box-sizing: border-box;103 padding-top: 14px;104 }105 106 li:nth-child(31) span, li:nth-child(30) span {107 display: block;108 line-height: 0.5;109 }