• html css制作正六边形


    1. DOCTYPE html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8" />
    5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    7. <title>首页title>
    8. head>
    9. <body>
    10. <style>
    11. * {
    12. margin: 0;
    13. padding: 0;
    14. box-sizing: border-box;
    15. }
    16. em,
    17. i {
    18. font-style: normal
    19. }
    20. li {
    21. list-style: none
    22. }
    23. img {
    24. border: 0;
    25. vertical-align: middle
    26. }
    27. button {
    28. cursor: pointer
    29. }
    30. a {
    31. color: #666;
    32. text-decoration: none
    33. }
    34. button,
    35. input {
    36. font-family: Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, "\5B8B\4F53", sans-serif;
    37. border: 0;
    38. outline: none;
    39. }
    40. .none {
    41. display: none
    42. }
    43. .clearfix:after {
    44. visibility: hidden;
    45. clear: both;
    46. display: block;
    47. content: ".";
    48. height: 0
    49. }
    50. .all div {
    51. position: absolute;
    52. color: #000;
    53. display: flex;
    54. align-items: center;
    55. justify-content: center;
    56. font-size: 40px;
    57. }
    58. .out {
    59. position: relative;
    60. width: 100%;
    61. height: 100%;
    62. }
    63. .center {
    64. position: absolute;
    65. top: 50%;
    66. left: 50%;
    67. transform: translate(-50%,-50%);
    68. z-index: 9;
    69. }
    70. .a {
    71. position: absolute;
    72. /* background-color:hotpink; */
    73. /* border: 1px solid #000; */
    74. width: 120px;
    75. height: 120px;
    76. cursor: pointer;
    77. margin-top: -1px;
    78. }
    79. .one1 {
    80. position: absolute;
    81. top: 0px;
    82. width:69.28px;
    83. height: 120px;
    84. border-top: 1px solid #000;
    85. border-bottom: 1px solid #000;
    86. /* background-color:green; */
    87. }
    88. .one2 {
    89. position: absolute;
    90. top: 0px;
    91. width: 69.28px;
    92. height: 120px;
    93. border-top: 1px solid #000;
    94. border-bottom: 1px solid #000;
    95. transform: rotate(-60deg);
    96. }
    97. .one3 {
    98. position: absolute;
    99. top: 0px;
    100. width: 69.28px;
    101. height: 120px;
    102. border-top: 1px solid #000;
    103. border-bottom: 1px solid #000;
    104. transform: rotate(60deg);
    105. }
    106. ul li {
    107. margin: 10px 0;
    108. cursor: pointer;
    109. }
    110. style>
    111. <div
    112. class="all page1"
    113. style="width: 1000px;height: 600px;position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);"
    114. >
    115. <div style="width: 100%;height: 100%;position: relative;">
    116. <div
    117. class="a a1"
    118. style="left: 50%;transform: translateX(-267px);top:0px;margin-left: 1px;"
    119. >
    120. <span class="center">A4span>
    121. <div class="one1 noe">div>
    122. <div class="one2 noe">div>
    123. <div class="one3 noe">div>
    124. div>
    125. <div
    126. class="a a2"
    127. style="left: 50%;transform: translateX(-267px);top:120px;margin-left: 1px;"
    128. >
    129. <span class="center">F3span>
    130. <div class="one1 noe">div>
    131. <div class="one2 noe">div>
    132. <div class="one3 noe">div>
    133. div>
    134. <div
    135. class="a a3"
    136. style="left: 50%;transform: translateX(-267px);top:240px;margin-left: 1px;"
    137. >
    138. <span class="center">L5span>
    139. <div class="one1 noe">div>
    140. <div class="one2 noe">div>
    141. <div class="one3 noe">div>
    142. div>
    143. <div
    144. class="a a4"
    145. style="left: 50%;transform: translateX(-267px);top:360px;margin-left: 1px;"
    146. >
    147. <span class="center">R5span>
    148. <div class="one1 noe">div>
    149. <div class="one2 noe">div>
    150. <div class="one3 noe">div>
    151. div>
    152. <div
    153. class="a a5"
    154. style="left: 50%;transform: translateX(-163px);top:60px;"
    155. >
    156. <span class="center">B3span>
    157. <div class="one1 noe">div>
    158. <div class="one2 noe">div>
    159. <div class="one3 noe">div>
    160. div>
    161. <div
    162. class="a a6"
    163. style="left: 50%;transform: translateX(-163px);top:180px;"
    164. >
    165. <span class="center">G2span>
    166. <div class="one1 noe">div>
    167. <div class="one2 noe">div>
    168. <div class="one3 noe">div>
    169. div>
    170. <div
    171. class="a a7"
    172. style="left: 50%;transform: translateX(-163px);top:300px;"
    173. >
    174. <span class="center">T5span>
    175. <div class="one1 noe">div>
    176. <div class="one2 noe">div>
    177. <div class="one3 noe">div>
    178. div>
    179. <div
    180. class="a a8"
    181. style="left: 50%;transform: translateX(-163px);top:420px;"
    182. >
    183. <span class="center">S5span>
    184. <div class="one1 noe">div>
    185. <div class="one2 noe">div>
    186. <div class="one3 noe">div>
    187. div>
    188. <div class="a a9" style="left: 50%;transform: translateX(-50%);top: 0;">
    189. <div class="out">div>
    190. <span class="center">C2span>
    191. <div class="one1 noe">div>
    192. <div class="one2 noe">div>
    193. <div class="one3 noe">div>
    194. div>
    195. <div
    196. class="a a10"
    197. style="left: 50%;transform: translateX(-50%);top: 120px;"
    198. >
    199. <span class="center">H3span>
    200. <div class="one1 noe">div>
    201. <div class="one2 noe">div>
    202. <div class="one3 noe">div>
    203. div>
    204. <div
    205. class="a a11"
    206. style="left: 50%;transform: translateX(-50%);top: 240px;"
    207. >
    208. <span class="center">N4span>
    209. <div class="one1 noe">div>
    210. <div class="one2 noe">div>
    211. <div class="one3 noe">div>
    212. div>
    213. <div
    214. class="a a12"
    215. style="left: 50%;transform: translateX(-50%);top:360px;"
    216. >
    217. <span class="center">W5span>
    218. <div class="one1 noe">div>
    219. <div class="one2 noe">div>
    220. <div class="one3 noe">div>
    221. div>
    222. <div
    223. class="a a13"
    224. style="left: 50%;transform: translateX(43px);top:60px;"
    225. >
    226. <span class="center">D7span>
    227. <div class="one1 noe">div>
    228. <div class="one2 noe">div>
    229. <div class="one3 noe">div>
    230. div>
    231. <div
    232. class="a a14"
    233. style="left: 50%;transform: translateX(43px);top:180px;"
    234. >
    235. <span class="center">J7span>
    236. <div class="one1 noe">div>
    237. <div class="one2 noe">div>
    238. <div class="one3 noe">div>
    239. div>
    240. <div
    241. class="a a15"
    242. style="left: 50%;transform: translateX(43px);top:300px;"
    243. >
    244. <span class="center">P7span>
    245. <div class="one1 noe">div>
    246. <div class="one2 noe">div>
    247. <div class="one3 noe">div>
    248. div>
    249. <div
    250. class="a a16"
    251. style="left: 50%;transform: translateX(43px);top:420px;"
    252. >
    253. <span class="center">X3span>
    254. <div class="one1 noe">div>
    255. <div class="one2 noe">div>
    256. <div class="one3 noe">div>
    257. div>
    258. <div
    259. class="a a17"
    260. style="left: 50%;transform: translateX(147px);top:0px;margin-left: -1px;"
    261. >
    262. <span class="center">E9span>
    263. <div class="one1 noe">div>
    264. <div class="one2 noe">div>
    265. <div class="one3 noe">div>
    266. div>
    267. <div
    268. class="a a18"
    269. style="left: 50%;transform: translateX(147px);top:120px;margin-left: -1px;"
    270. >
    271. <span class="center">K8span>
    272. <div class="one1 noe">div>
    273. <div class="one2 noe">div>
    274. <div class="one3 noe">div>
    275. div>
    276. <div
    277. class="a a19"
    278. style="left: 50%;transform: translateX(147px);top:240px;margin-left: -1px;"
    279. >
    280. <span class="center">Q4span>
    281. <div class="one1 noe">div>
    282. <div class="one2 noe">div>
    283. <div class="one3 noe">div>
    284. div>
    285. <div
    286. class="a a20"
    287. style="left: 50%;transform: translateX(147px);top:360px;margin-left: -1px;"
    288. >
    289. <span class="center">Z2span>
    290. <div class="one1 noe">div>
    291. <div class="one2 noe">div>
    292. <div class="one3 noe">div>
    293. div>
    294. div>
    295. div>
    296. body>
    297. html>

  • 相关阅读:
    在线渲染3d怎么用?3d快速渲染步骤设置
    操作系统—内核态和用户态
    浅谈新生代为什么要分三块区域并且比例为什么是8:1:1
    android读取sd卡上文件中的数据
    【开源】基于Vue.js的校园二手交易系统的设计和实现
    XUbuntu22.04之解决桌面突然放大,屏幕跟着鼠标移动问题(一百九十)
    JVM核心参数图解-整理
    爬虫(9) - Scrapy框架(1) | Scrapy 异步网络爬虫框架
    C Primer Plus(6) 中文版 第2章 C语言概述 2.1 简单的C程序示例
    [2022-11-28]神经网络与深度学习 hw10 - LSTM和GRU
  • 原文地址:https://blog.csdn.net/qq_43770056/article/details/133157128