pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

HTML5+CSS3實現機器貓

本文給大家分享一段html5和css3實現的機器貓功能,代碼簡單易懂非常不錯,具有參考借鑒價值,感興趣的朋友一起看看吧

下面一段代碼是有關html5和css3實現機器貓的代碼,具體代碼如下所示:

XML/HTML Code復制內容到剪貼板
  1. <!DOCTYPE html>  
  2. <html lang="en">  
  3. <head>  
  4. <meta charset="UTF-8">  
  5. <title>機器貓</title>  
  6. <style type="text/css">  
  7. * {   
  8. margin: 0;   
  9. padding: 0;   
  10. }   
  11. .whole {   
  12. width: 800px;   
  13. margin: 20px auto;   
  14. /*border: 2px solid yellow;*/   
  15. background-color: white;   
  16. position: relative;   
  17. }   
  18. .head {   
  19. margin: 0 auto;   
  20. position: relative;   
  21. width: 500px;   
  22. height: 440px;   
  23. background-color: #00b7e7;   
  24. border-radius: 220px;   
  25. border: 1px solid red;   
  26. }   
  27. .eye .left_eye,   
  28. .eye .right_eye {   
  29. width: 100px;   
  30. height: 130px;   
  31. background-color: white;   
  32. border: 2px solid black;   
  33. border-radius: 50px;   
  34. position: absolute;   
  35. top: 50px;   
  36. z-index: 3;   
  37. }   
  38. .eye .LeyeBall,   
  39. .eye .ReyeBall {   
  40. width: 20px;   
  41. height: 20px;   
  42. background: black;   
  43. border-radius: 10px;   
  44. position: absolute;   
  45. top: 65px;   
  46. }   
  47. .eye .left_eye {   
  48. left: 146px;   
  49. }   
  50. .eye .right_eye {   
  51. left: 250px;   
  52. }   
  53. .eye .LeyeBall {   
  54. right: 10px;   
  55. }   
  56. .eye .ReyeBall {   
  57. left: 10px;   
  58. }   
  59. .face {   
  60. position: relative;   
  61. z-index: 2;   
  62. }   
  63. .face .feature {   
  64. width: 400px;   
  65. height: 320px;   
  66. border-radius: 160px;   
  67. position: absolute;   
  68. top: 100px;   
  69. left: 50px;   
  70. background: white;   
  71. }   
  72. .face .nose {   
  73. width: 45px;   
  74. height: 50px;   
  75. border-radius: 23px;   
  76. background-color: #cf3318;   
  77. border: 2px solid black;   
  78. position: absolute;   
  79. top: 165px;   
  80. left: 225px;   
  81. z-index: 3;   
  82. }   
  83. .face .Nline {   
  84. width: 3px;   
  85. height: 160px;   
  86. background: black;   
  87. position: absolute;   
  88. top: 218px;   
  89. left: 248px;   
  90. z-index: 3;   
  91. }   
  92. .face .mouth {   
  93. width: 280px;   
  94. height: 280px;   
  95. border-bottom: 5px solid black;   
  96. border-radius: 140px;   
  97. position: absolute;   
  98. top: 98px;   
  99. left: 105px;   
  100. }   
  101. .face .mustache .MutR_higher {   
  102. width: 80px;   
  103. height: 2px;   
  104. background: black;   
  105. position: absolute;   
  106. top: 220px;   
  107. left: 295px;   
  108. z-index: 2;   
  109. }   
  110. .face .mustache .MutR_middle {   
  111. width: 80px;   
  112. height: 2px;   
  113. background: black;   
  114. position: absolute;   
  115. top: 240px;   
  116. left: 295px;   
  117. z-index: 2;   
  118. }   
  119. .face .mustache .MutR_lower {   
  120. width: 80px;   
  121. height: 2px;   
  122. background: black;   
  123. position: absolute;   
  124. top: 260px;   
  125. left: 295px;   
  126. z-index: 2;   
  127. }   
  128. .face .mustache .MutL_top {   
  129. width: 80px;   
  130. height: 2px;   
  131. background: black;   
  132. position: absolute;   
  133. top: 220px;   
  134. left: 115px;   
  135. z-index: 2;   
  136. }   
  137. .face .mustache .MutL_center {   
  138. width: 80px;   
  139. height: 2px;   
  140. background: black;   
  141. position: absolute;   
  142. top: 240px;   
  143. left: 115px;   
  144. z-index: 2;   
  145. }   
  146. .face .mustache .MutL_bottom {   
  147. width: 80px;   
  148. height: 2px;   
  149. background: black;   
  150. position: absolute;   
  151. top: 260px;   
  152. left: 115px;   
  153. z-index: 2;   
  154. }   
  155. .face .mustache .MutL_bottom,   
  156. .face .mustache .MutR_higher {   
  157. transform: rotate(160deg);   
  158. }   
  159. .face .mustache .MutL_top,   
  160. .face .mustache .MutR_lower {   
  161. transform: rotate(200deg);   
  162. }   
  163. .neck {   
  164. width: 300px;   
  165. height: 30px;   
  166. background-color: #a31f12;   
  167. border: 2px solid black;   
  168. border-radius: 15px;   
  169. position: relative;   
  170. top: 0px;   
  171. left: 250px;   
  172. z-index: 4;   
  173. }   
  174. .neck .bell {   
  175. width: 60px;   
  176. height: 60px;   
  177. overflow: hidden;   
  178. border: 2px solid black;   
  179. border-radius: 60px;   
  180. background-color: #cfcb3c;   
  181. position: absolute;   
  182. top: 5px;   
  183. left: 120px;   
  184. }   
  185. .bell .Bline {   
  186. width: 60px;   
  187. height: 2px;   
  188. background-color: #cfcb3c;   
  189. border: 2px solid black;   
  190. border-radius: 3px 3px 0 0;   
  191. position: absolute;   
  192. top: 15px;   
  193. }   
  194. .bell .Bcircle {   
  195. width: 20px;   
  196. height: 16px;   
  197. background: black;   
  198. border-radius: 8px;   
  199. position: absolute;   
  200. top: 25px;   
  201. left: 20px;   
  202. }   
  203. .bell .Bunderpart {   
  204. width: 3px;   
  205. height: 20px;   
  206. background-color: black;   
  207. position: absolute;   
  208. left: 28px;   
  209. top: 40px;   
  210. }   
  211. .body {   
  212. position: relative;   
  213. top: -300px;   
  214. z-index: 1;   
  215. }   
  216. .body .tummy {   
  217. width: 280px;   
  218. height: 240px;   
  219. background-color: #00b1e1;   
  220. border: 2px solid black;   
  221. position: absolute;   
  222. top: 267px;   
  223. left: 260px;   
  224. }   
  225. .body .bellyband {   
  226. width: 220px;   
  227. height: 220px;   
  228. background-color: white;   
  229. border: 2px solid black;   
  230. border-radius: 110px;   
  231. position: absolute;   
  232. left: 290px;   
  233. top: 267px;   
  234. }   
  235. .body .pocket {   
  236. width: 160px;   
  237. height: 160px;   
  238. border-radius: 80px;   
  239. background-color: white;   
  240. border: 2px solid black;   
  241. position: absolute;   
  242. top: 305px;   
  243. left: 320px;   
  244. }   
  245. .cover {   
  246. width: 164px;   
  247. height: 80px;   
  248. background-color: white;   
  249. border-bottom: 2px solid black;   
  250. /*border: 5px solid orange;*/   
  251. position: absolute;   
  252. top: 300px;   
  253. left: 320px;   
  254. }   
  255. .left_hand,   
  256. .right_hand {   
  257. height: 100px;   
  258. width: 100px;   
  259. position: absolute;   
  260. top: 272px;   
  261. left: 248px;   
  262. }   
  263. .left_hand {   
  264. left: -10px;   
  265. }   
  266. .left_hand .Larm {   
  267. width: 70px;   
  268. height: 100px;   
  269. background-color: #00bee8;   
  270. border: 1px solid black;   
  271. position: relative;   
  272. top: 200px;   
  273. left: 535px;   
  274. transform: rotateZ(135deg);   
  275. /*z-index: -1;*/   
  276. }   
  277. .right_hand {   
  278. left: -10px;   
  279. }   
  280. .right_hand .Rarm {   
  281. width: 70px;   
  282. height: 100px;   
  283. background-color: #00bee8;   
  284. border: 1px solid black;   
  285. /*z-index: -1;*/   
  286. position: relative;   
  287. top: 200px;   
  288. left: 215px;   
  289. transform: rotateZ(45deg);   
  290. }   
  291. .left_hand .Lpalm,   
  292. .right_hand .Rpalm {   
  293. width: 80px;   
  294. height: 80px;   
  295. border-radius: 40px;   
  296. border: 2px solid black;   
  297. background-color: white;   
  298. position: absolute;   
  299. }   
  300. .right_hand .Rpalm {   
  301. left: 580px;   
  302. top: 260px;   
  303. z-index: 1;   
  304. }   
  305. .left_hand .Lpalm {   
  306. left: 160px;   
  307. top: 260px;   
  308. z-index: 1;   
  309. }   
  310. .foot .left_foot,   
  311. .foot .right_foot {   
  312. width: 150px;   
  313. height: 40px;   
  314. background-color: white;   
  315. border: 2px solid black;   
  316. border-radius: 80px 60px 60px 40px;   
  317. position: relative;   
  318. }   
  319. .foot .left_foot {   
  320. left: 240px;   
  321. top: 210px;   
  322. }   
  323. .foot .right_foot {   
  324. top: 165px;   
  325. left: 410px;   
  326. }   
  327. .foot .crotch {   
  328. width: 40px;   
  329. height: 20px;   
  330. background-color: white;   
  331. border: 2px solid black;   
  332. border-bottom: none;   
  333. border-radius: 40px 40px 0 0;   
  334. position: relative;   
  335. top: 103px;   
  336. left: 382px;   
  337. z-index: 2   
  338. }   
  339. </style>  
  340. </head>  
  341. <body>  
  342. <div class="wrap">  
  343. <div class="whole">  
  344. <!-- 頭 -->  
  345. <div class="head">  
  346. <!-- 眼 -->  
  347. <div class="eye">  
  348. <!-- 左眼 -->  
  349. <div class="left_eye">  
  350. <!-- 左眼球 -->  
  351. <div class="LeyeBall"></div>  
  352. </div>  
  353. <!-- 右眼 -->  
  354. <div class="right_eye">  
  355. <!-- 右眼球 -->  
  356. <div class="ReyeBall"></div>  
  357. </div>  
  358. </div>  
  359. <!-- 臉 -->  
  360. <div class="face">  
  361. <!-- 臉型 -->  
  362. <div class="feature"></div>  
  363. <!-- 鼻 -->  
  364. <div class="nose"></div>  
  365. <!-- 鼻子線 -->  
  366. <div class="Nline"></div>  
  367. <!-- 嘴 -->  
  368. <div class="mouth"></div>  
  369. <!-- 胡子 -->  
  370. <div class="mustache">  
  371. <div class="MutL_top"></div>  
  372. <div class="MutL_center"></div>  
  373. <div class="MutL_bottom"></div>  
  374. <div class="MutR_higher"></div>  
  375. <div class="MutR_middle"></div>  
  376. <div class="MutR_lower"></div>  
  377. </div>  
  378. </div>  
  379. </div>  
  380. <!-- 脖子 -->  
  381. <div class="neck">  
  382. <!-- 鈴鐺 -->  
  383. <div class="bell">  
  384. <div class="Bline"></div>  
  385. <div class="Bcircle"></div>  
  386. <div class="Bunderpart"></div>  
  387. </div>  
  388. </div>  
  389. <!-- 身體 -->  
  390. <div class="body">  
  391. <!-- 肚子 -->  
  392. <div class="tummy"></div>  
  393. <!-- 肚兜 -->  
  394. <div class="bellyband"></div>  
  395. <!-- 口袋 -->  
  396. <div class="pocket"></div>  
  397. <div class="cover"></div>  
  398. </div>  
  399. <!-- 左手 -->  
  400. <div class="left_hand">  
  401. <!-- 手臂 -->  
  402. <div class="Larm"></div>  
  403. <!-- 手掌 -->  
  404. <div class="Lpalm"></div>  
  405. </div>  
  406. <!-- 右手 -->  
  407. <div class="right_hand">  
  408. <!-- 手臂 -->  
  409. <div class="Rarm"></div>  
  410. <!-- 手掌 -->  
  411. <div class="Rpalm"></div>  
  412. </div>  
  413. <!-- 腳 -->  
  414. <div class="foot">  
  415. <!-- 左腳 -->  
  416. <div class="left_foot"></div>  
  417. <!-- 右腳 -->  
  418. <div class="right_foot"></div>  
  419. <div class="crotch"></div>  
  420. </div>  
  421. </div>  
  422. </div>  
  423. </body>  
  424. </html>  
【網站聲明】本站除付費源碼經過測試外,其他素材未做測試,不保證完整性,網站上部分源碼僅限學習交流,請勿用于商業用途。如損害你的權益請聯系客服QQ:2655101040 給予處理,謝謝支持。

相關文檔推薦

這篇文章主要介紹了有關HTML5頁面在iPhoneX適配問題,需要的朋友可以參考下
本篇文章主要介紹了html5中canvas圖表實現柱狀圖的示例,本文使用canvas來實現一個圖表,小編覺得挺不錯的,現在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
Adobe公司出品的多媒體處理軟件產品線較多,涵蓋了音視頻編輯、圖像處理、平面設計、影視后期等領域。這篇文章主要介紹了Adobe Html5 Extension開發初體驗圖文教程,非常不錯,需要的朋
這篇文章主要介紹了基于HTML5的WebGL經典3D虛擬機房漫游動畫,需要的朋友可以參考下
這篇文章主要介紹了html5實現移動端適配完美寫法,需要的朋友可以參考下
本篇文章主要介紹了HTML5響應式(自適應)網頁設計的實現,小編覺得挺不錯的,現在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
主站蜘蛛池模板: 华东师范大学在职研究生招生网_在职研究生招生联展网 | 行星齿轮减速机,减速机厂家,山东减速机-淄博兴江机械制造 | 面粉仓_储酒罐_不锈钢储酒罐厂家-泰安鑫佳机械制造有限公司 | 加盟店-品牌招商加盟-创业项目商机平台 | 打孔器,打孔钳厂家【温州新星德牌五金工具】 | 压装机-卧式轴承轮轴数控伺服压装机厂家[铭泽机械] | 布袋除尘器-单机除尘器-脉冲除尘器-泊头市兴天环保设备有限公司 布袋除尘器|除尘器设备|除尘布袋|除尘设备_诺和环保设备 | 工业机械三维动画制作 环保设备原理三维演示动画 自动化装配产线三维动画制作公司-南京燃动数字 聚合氯化铝_喷雾聚氯化铝_聚合氯化铝铁厂家_郑州亿升化工有限公司 | 管形母线,全绝缘铜管母线厂家-山东佰特电气科技有限公司 | 破碎机锤头_耐磨锤头_合金锤头-鼎成机械一站式耐磨铸件定制服务 微型驱动系统解决方案-深圳市兆威机电股份有限公司 | 宜兴紫砂壶知识分享 - 宜兴壶人 医用空气消毒机-医用管路消毒机-工作服消毒柜-成都三康王 | 双工位钻铣攻牙机-转换工作台钻攻中心-钻铣攻牙机一体机-浙江利硕自动化设备有限公司 | 高柔性拖链电缆-聚氨酯卷筒电缆-柔性屏蔽电缆厂家-玖泰电缆 | 热熔胶网膜|pes热熔网膜价格|eva热熔胶膜|热熔胶膜|tpu热熔胶膜厂家-苏州惠洋胶粘制品有限公司 | 不干胶标签-不干胶贴纸-不干胶标签定制-不干胶标签印刷厂-弗雷曼纸业(苏州)有限公司 | 五轴加工中心_数控加工中心_铝型材加工中心-罗威斯 | 昆明化妆培训-纹绣美甲-美容美牙培训-昆明博澜培训学校 | 小型手持气象站-空气负氧离子监测站-多要素微气象传感器-山东天合环境科技有限公司 | 涡街流量计_LUGB智能管道式高温防爆蒸汽温压补偿计量表-江苏凯铭仪表有限公司 | 国产离子色谱仪,红外分光测油仪,自动烟尘烟气测试仪-青岛埃仑通用科技有限公司 | 水环真空泵厂家,2bv真空泵,2be真空泵-淄博真空设备厂 | 铁艺,仿竹,竹节,护栏,围栏,篱笆,栅栏,栏杆,护栏网,网围栏,厂家 - 河北稳重金属丝网制品有限公司 山东太阳能路灯厂家-庭院灯生产厂家-济南晟启灯饰有限公司 | 抖音短视频运营_企业网站建设_网络推广_全网自媒体营销-东莞市凌天信息科技有限公司 | 保镖公司-私人保镖-深圳保镖公司【环宇兄弟保镖】 | 螺杆泵_中成泵业| 盐水蒸发器,水洗盐设备,冷凝结晶切片机,转鼓切片机,絮凝剂加药系统-无锡瑞司恩机械有限公司 | 铁艺,仿竹,竹节,护栏,围栏,篱笆,栅栏,栏杆,护栏网,网围栏,厂家 - 河北稳重金属丝网制品有限公司 山东太阳能路灯厂家-庭院灯生产厂家-济南晟启灯饰有限公司 | 粘度计维修,在线粘度计,二手博勒飞粘度计维修|收购-天津市祥睿科技有限公司 | 广东青藤环境科技有限公司-水质检测 | 北京易通慧公司从事北京网站优化,北京网络推广、网站建设一站式服务商-北京网站优化公司 | 生物风-销售载体,基因,质粒,ATCC细胞,ATCC菌株等,欢迎购买-百风生物 | 培训中心-海南香蕉蛋糕加盟店技术翰香原中心官网总部 | 广州昊至泉水上乐园设备有限公司| 泰国试管婴儿_泰国第三代试管婴儿_泰国试管婴儿费用/多少钱_孕泰来 | 浙江美尔凯特智能厨卫股份有限公司 | 搬运设备、起重设备、吊装设备—『龙海起重成套设备』 | 除甲醛公司-甲醛检测治理-杭州创绿家环保科技有限公司-室内空气净化十大品牌 | 七维官网-水性工业漆_轨道交通涂料_钢结构漆 | 泥沙分离_泥沙分离设备_泥砂分离机_洛阳隆中重工机械有限公司 | 啤酒设备-小型啤酒设备-啤酒厂设备-济南中酿机械设备有限公司 | 德国EA可编程直流电源_电子负载,中国台湾固纬直流电源_交流电源-苏州展文电子科技有限公司 |