jquery+css实现钟表走动动画效果代码
代码语言:html
所属分类:布局界面
代码描述:jquery+css实现钟表走动动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href='https://fonts.googleapis.com/css?family=Tulpen+One' rel='stylesheet' type='text/css'> <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> <style> *, *:before, *:after { box-sizing: border-box; } body { background-color: #E3E2DC; font-family: 'Open Sans', sans-serif; } h1 { display: inline-box; margin: 3rem auto; width: 7em; color: #ECEAE8; font-size: 40px; line-height: 2; text-align: center; text-shadow: rgba(0, 0, 0, 0.1) -1px 0, rgba(0, 0, 0, 0.1) 0 -1px, rgba(255, 255, 255, 0.3) 1px 0, rgba(255, 255, 255, 0.3) 0 1px, rgba(0, 0, 0, 0.1) -1px -1px, rgba(255, 255, 255, 0.3) 1px 1px; background-color: #CFCFCF; border: 3px solid #CFCFCF; border-radius: 5px; box-shadow: inset 0 1px 3px #898989, 0 -1px 3px #898989; } .watch { position: absolute; top: 50%; left: 50%; } .frame { position: absolute; top: -250px; left: -250px; width: 500px; height: 500px; background-color: #ECEAE8; border: 3px solid #898989; border-radius: 50%; box-shadow: 0 0 0 7px #CFCFCF, 0 0 0 19px #E5E5E5, 0 0 80px 19px rgba(0, 0, 0, 0.2), inset 10px 10px 10px rgba(0, 0, 0, 0.3); } .numbers { position: absolute; top: 250px; left: 250px; width: 1px; height: 1px; border-radius: 50%; } .numbers span { display: block; position: absolute; outline: 1px solid transparent; left: -13px; top: -253px; width: 20px; height: 500px; color: #292725; font-size: 30px; line-height: 10px; text-align: center; -webkit-transform-origin: center; transform-origin: center; overflow: hidden; } .numbers span:nth-of-type(1) { -webkit-transform: rotate(6deg); transform: rotate(6deg); } .numbers span:nth-of-type(2) { -webkit-transform: rotate(12deg); transform: rotate(12deg); } .numbers span:nth-of-type(3) { -webkit-transform: rotate(18deg); transform: rotate(18deg); } .numbers span:nth-of-type(4) { -webkit-transform: rotate(24deg); transform: rotate(24deg); } .numbers span:nth-of-type(5) { -webkit-transform: rotate(30deg); transform: rotate(30deg); } .numbers span:nth-of-type(6) { -webkit-transform: rotate(36deg); transform: rotate(36deg); } .numbers span:nth-of-type(7) { -webkit-transform: rotate(42deg); transform: rotate(42deg); } .numbers span:nth-of-type(8) { -webkit-transform: rotate(48deg); transform: rotate(48deg); } .numbers span:nth-of-type(9) { -webkit-transform: rotate(54deg); transform: rotate(54deg); } .numbers span:nth-of-type(10) { -webkit-transform: rotate(60deg); transform: rotate(60deg); } .numbers span:nth-of-type(11) { -webkit-transform: rotate(66deg); transform: rotate(66deg); } .numbers span:nth-of-type(12) { -webkit-transform: rotate(72deg); transform: rotate(72deg); } .numbers span:nth-of-type(13) { -webkit-transform: rotate(78deg); transform: rotate(78deg); } .numbers span:nth-of-type(14) { -webkit-transform: rotate(84deg); transform: rotate(84deg); } .numbers span:nth-of-type(15) { -webkit-transform: rotate(90deg); transform: rotate(90deg); } .numbers span:nth-of-type(16) { -webkit-transform: rotate(96deg); transform: rotate(96deg); } .numbers span:nth-of-type(17) { -webkit-transform: rotate(102deg); transform: rotate(102deg); } .numbers span:nth-of-type(18) { -webkit-transform: rotate(108deg); transform: rotate(108deg); } .numbers span:nth-of-type(19) { -webkit-transform: rotate(114deg); transform: rotate(114deg); } .numbers span:nth-of-type(20) { -webkit-transform: rotate(120deg); transform: rotate(120deg); } .numbers span:nth-of-type(21) { -webkit-transform: rotate(126deg); transform: rotate(126deg); } .numbers span:nth-of-type(22) { -webkit-transform: rotate(132deg); transform: rotate(132deg); } .numbers span:nth-of-type(23) { -webkit-transform: rotate(138deg); transform: rotate(138deg); } .numbers span:nth-of-type(24) { -webkit-transform: rotate(144deg); transform: rotate(144deg); } .numbers span:nth-of-type(25) { -webkit-transform: rotate(150deg); transform: rotate(150deg); } .numbers span:nth-of-type(26) { -webkit-transform: rotate(156deg); transform: rotate(156deg); } .numbers span:nth-of-type(27) { -webkit-transform: rotate(162deg); transform: rotate(162deg); } .numbers span:nth-of-type(28) { -webkit-transform: rotate(168deg); transform: rotate(168deg); } .numbers span:nth-of-type(29) { -webkit-transform: rotate(174deg); transform: rotate(174deg); } .numbers span:nth-of-type(30) { -webkit-transform: rotate(180deg); transform: rotate(180deg); } .numbers span:nth-of-type(31) { -webkit-transform: rotate(186deg); transform: rotate(186deg); } .numbers span:nth-of-type(32) { -webkit-transform: rotate(192deg); transform: rotate(192deg); } .numbers span:nth-of-type(33) { -webkit-transform: rotate(198deg); transform: rotate(198deg); } .numbers span:nth-of-type(34) { -webkit-transform: rotate(204deg); transform: rotate(204deg); } .numbers span:nth-of-type(35) { -webkit-transform: rotate(210deg); transform: rotate(210deg); } .numbers span:nth-of-type(36) { -webkit-transform: rotate(216deg); transform: rotate(216deg); } .numbers span:nth-of-type(37) { -webkit-transform: rotate(222deg); transform: rotate(222deg); } .numbers span:nth-of-type(38) { -webkit-transform: rotate(228deg); transform: rotate(228deg); } .numbers span:nth-of-type(39) { -webkit-transform: rotate(234deg); transform: rotate(234deg); } .numbers span:nth-of-type(40) { -webkit-transform: rotate(240deg); transform: rotate(240deg); } .numbers span:nth-of-type(41) { -webkit-transform: rotate(246deg); transform: rotate(246deg); } .numbers span:nth-of-type(42) { -webkit-transform: rotate(252deg); transform: rotate(252deg); } .numbers span:nth-of-type(43) { -webkit-transform: rotate(258deg); transform: rotate(258deg); } .numbers span:nth-of-type(44) { -webkit-transform: rotate(264deg); transform: rotate(264deg); } .numbers span:nth-of-type(45) { -webkit-transform: rotate(270deg); transform: rotate(270deg); } .numbers span:nth-of-type(46) { -webkit-transform: rotate(276deg); transform: rotate(276deg); } .numbers span:nth-of-type(47) { -webkit-transform: rotate(282deg); transform: rotate(282deg); } .numbers span:nth-of-type(48) { -webkit-transform: rotate(288deg); transform: rotate(288deg); } .numbers span:nth-of-type(49) { -webkit-transform: rotate(294deg); transform: rotate(294deg); } .numbers span:nth-of-type(50) { -webkit-transform: rotate(300deg); transform: rotate(300deg); } .numbers span:nth-of-type(51) { -webkit-transform: rotate(306deg); transform: rotate(306deg); } .numbers span:nth-of-type(52) { -webkit-transform: rotate(312deg); transform: rotate(312deg); } .numbers span:nth-of-type(53) { -webkit-transform: rotate(318deg); transform: rotate(318deg); } .numbers span:nth-of-type(54) { -webkit-transform: rotate(324deg); transform: rotate(324deg); } .numbers span:nth-of-type(55) { -webkit-transform: rotate(330deg); transform: rotate(330deg); } .numbers span:nth-of-type(56) { -webkit-transform: rotate(336deg); transform: rotate(336deg); } .numbers span:nth-of-type(57) { -webkit-transform: rotate(342deg); transform: rotate(342deg); } .numbers span:nth-of-type(58) { -webkit-transform: rotate(348deg); transform: rotate(348deg); } .numbers span:nth-of-type(59) { -webkit-transform: rotate(354deg); transform: rotate(354deg); } .numbers span:nth-of-type(60) { -webkit-transform: rotate(360deg); transform: rotate(360deg); } .numbers span:nth-of-type(5n) { padding-top: 12px; font-size: 16px; } .numbers span:nth-of-type(5n):before { content: ''; display: box; position: absolute; left: 6px; top: 60px; width: 8px; height: 8px; border-radius: 50%; background-color: #292725; } .numbers span:nth-of-type(29n), .numbers span:nth-of-type(31n), .numbers span:nth-of-type(30n):before { display: none; } .numbers span:nth-of-type(58n), .numbers span:nth-of-type(60n):before { display: block; } .numbers span:nth-of-type(15n):before { content: ''; display: box; position: absolute; left: 4px; top: 60px; width: 12px; height: 12px; border-radius: 50%; background-color: #94C3B9; } .day { position: absolute; top: 435px; left: 224px; height: 0; width: 45px; border-bottom: 50px solid #F8F8F8; border-left: 6px solid transparent; border-right: 6px solid transparent; padding: 0 8px 0 0; outline: 1px solid transparent; /* 3D antialiasing*/ font-family: 'Tulpen One', cursive; font-size: 40px; line-height: 16px; text-align: right; } .day span { display: box; position: absolute; top: 5px; left: 0px; height: 0; width: 32px; border-bottom: 40px solid #F8F8F8; border-left: 4px solid transparent; border-right: 4px solid transparent; padding: 0 8px 0 3px; line-height: 44px; letter-spacing: 3px; -webkit-perspective: 150px; perspective: 150px; } .day span:before { content: ''; display: box; position: absolute; top: -12px; left: -3px; height: 58px; width: 32px; outline: 1px solid transparent; /* 3D antialiasing*/ -webkit-transform: rotateX(45deg); transform:.........完整代码请登录后点击上方下载按钮下载查看
网友评论0