• html制作小猪佩奇卡通图案代码,使用HTML和CSS3绘制基本卡通图案的示例分享


    一、👨‍🎓网站题目

    卡通网站的设计与制作。

    二、✍️网站描述


    小猪佩奇主题的网页 一共五个个页面
    - 小猪佩奇网页使用html css js制作 有banana图
    - 页面可以相互跳转 包含表单 三级页面
    - 网页可以使用vscode hbuilder dw等打开修改
    - 里面的图片和文字都可以替换为其他旅游网页
    - html静态网页 没有复杂效果 布局简单 原创html网页设计 适合当作业使用

    👨‍🎓静态网站的编写主要是用HTML DIV+CSS 等来完成页面的排版设计👩‍🎓,常用的网页设计软件有Dreamweaver、EditPlus、HBuilderX、VScode 、Webstorm、Animate等等,用的最多的还是DW,当然不同软件写出的前端Html5代码都是一致的,本网页适合修改成为各种类型的产品展示网页,比如美食、旅游、摄影、电影、音乐等等多种主题,希望对大家有所帮助。

    三、📚网站介绍

    📔网站布局方面:计划采用目前主流的、能兼容各大主流浏览器、显示效果稳定的浮动网页布局结构。

    📓网站程序方面:计划采用最新的网页编程语言HTML5+CSS3程序语言完成网站的功能设计。并确保网站代码兼容目前市面上所有的主流浏览器,已达到打开后就能即时看到网站的效果。

    📘网站素材方面:计划收集各大平台好看的图片素材,并精挑细选适合网页风格的图片,然后使用PS做出适合网页尺寸的图片。

    📒网站文件方面:网站系统文件种类包含:html网页结构文件、css网页样式文件、js网页特效文件、images网页图片文件;

    📙网页编辑方面:网页作品代码简单,可使用任意HTML编辑软件(如:Dreamweaver、HBuilder、Vscode 、Sublime 、Webstorm、Text 、Notepad++ 等任意html编辑软件进行运行及修改编辑等操作)。
    其中:
    (1)📜html文件包含:其中index.html是首页、其他html为二级页面;
    (2)📑 css文件包含:css全部页面样式,文字滚动, 图片放大等;

    四、🌐网站效果

    五、🪓 代码实现

    🧱HTML
    1. <!DOCTYPE html>
    2. <html lang="en">
    3. <style>
    4. body {
    5. /* background: url(); */
    6. background-color: eac1d7;
    7. }
    8. .container {
    9. width: 1000px;
    10. margin: 0 auto;
    11. }
    12. header {
    13. width: 100%;
    14. height: 60px;
    15. z-index: 999;
    16. }
    17. header .container {
    18. display: flex;
    19. height: 100%;
    20. }
    21. header .nav_left {
    22. display: flex;
    23. width: 400px;
    24. height: 100%;
    25. }
    26. header .nav_left img {
    27. width: 200px;
    28. height: 50px;
    29. margin-top: 5px;
    30. padding-right: 10px;
    31. border-right: 1px solid #eac1d7;
    32. }
    33. header .nav_left .logo_text {
    34. padding-left: 10px;
    35. box-sizing: border-box;
    36. display: flex;
    37. flex-direction: column;
    38. justify-content: center;
    39. }
    40. header .container .nav_right {
    41. width: 600px;
    42. height: 100%;
    43. }
    44. .two {
    45. width: 90px;
    46. height: 80px;
    47. display: flex;
    48. flex-direction: column;
    49. justify-content: center;
    50. }
    51. #main {
    52. /* overflow: auto; */
    53. text-align: center;
    54. }
    55. #main a {
    56. text-decoration: none;
    57. display: inline-block;
    58. height: 60px;
    59. width: 100px;
    60. line-height: 60px;
    61. }
    62. ul {
    63. list-style: none;
    64. }
    65. #list {
    66. display: inline-block;
    67. margin: 0px;
    68. padding: 0px;
    69. vertical-align: bottom;
    70. height: 60px;
    71. width: 600px;
    72. }
    73. #list li {
    74. float: left;
    75. height: 60px;
    76. line-height: 60px;
    77. }
    78. a:hover {
    79. color: #ffff;
    80. }
    81. #list li ul {
    82. display: none;
    83. position: absolute;
    84. }
    85. #list li:hover ul {
    86. display: block;
    87. }
    88. .two {
    89. z-index: 99999;
    90. background-color: #eac1d7;
    91. height: 240px;
    92. width: 100px;
    93. }
    94. .two li,
    95. .two li a {
    96. width: 100px;
    97. height: 60px;
    98. line-height: 60px;
    99. text-align: center;
    100. }
    101. .two li a:hover {
    102. color: #fff;
    103. }
    104. #list li:hover,
    105. #list>li:hover .two li:hover {
    106. background-color: #4fb8e9;
    107. }
    108. /* banner/ */
    109. .b {
    110. padding: 0;
    111. margin: 0;
    112. width: 100%;
    113. height: 400px;
    114. background: url(../img/banner1.png) no-repeat;
    115. background-size: 100% 100%;
    116. position: relative;
    117. }
    118. .banner {
    119. padding: 0;
    120. margin: 0;
    121. width: 100%;
    122. height: 400px;
    123. background: url(../img/banner.jpg) no-repeat;
    124. background-size: 100% 100%;
    125. position: relative;
    126. }
    127. .banner .container {
    128. position: absolute;
    129. left: 0;
    130. bottom: 0;
    131. width: 100%;
    132. height: 60px;
    133. margin: 0 auto;
    134. }
    135. .nav {
    136. display: flex;
    137. width: 100%;
    138. height: 60px;
    139. align-items: center;
    140. line-height: 60px;
    141. text-align: center;
    142. background-color: rgba(0, 0, 0, .4);
    143. margin: 0 auto;
    144. padding: 0 17%;
    145. box-sizing: border-box;
    146. }
    147. .nav a {
    148. flex: 1;
    149. color: #4fb8e9;
    150. }
    151. .nav a:hover {
    152. background-color: #FFF;
    153. }
    154. /* content */
    155. .content .container {
    156. background-color: #fff;
    157. padding: 20px;
    158. box-sizing: border-box;
    159. }
    160. .first_area {
    161. width: 100%;
    162. text-align: center;
    163. }
    164. .content .container h2 {
    165. text-align: center;
    166. margin-bottom: 20px;
    167. font-size: 26px;
    168. font-weight: normal;
    169. }
    170. .content .container p {
    171. color: #333;
    172. line-height: 2;
    173. }
    174. .container .map {
    175. width: 95%;
    176. margin-bottom: 50px;
    177. }
    178. .content .tools {
    179. display: flex;
    180. height: 100px;
    181. align-items: center;
    182. justify-content: space-around;
    183. margin-bottom: 100px;
    184. }
    185. .tools .item {
    186. width: 280px;
    187. height: 100%;
    188. border: 1px solid #4fb8e9;
    189. padding: 20px;
    190. box-sizing: border-box;
    191. position: relative;
    192. font-size: 12px;
    193. text-align: center;
    194. color: #666;
    195. }
    196. .tools .item img {
    197. position: absolute;
    198. left: 50%;
    199. bottom: -30px;
    200. transform: translateX(-50%);
    201. }
    202. .two_area {
    203. width: 90%;
    204. margin: 0 auto;
    205. }
    206. .two_area .two_title {
    207. width: 100%;
    208. background-color:#4fb8e9;
    209. margin: 0 auto;
    210. height: 30px;
    211. padding: 5px;
    212. line-height: 30px;
    213. color: #fff;
    214. }
    215. .two_area .two_title img {
    216. height: 30px;
    217. margin-right: 10px;
    218. }
    219. .two_container .list {
    220. width: 700px;
    221. margin: 0 auto;
    222. display: flex;
    223. flex-wrap: wrap;
    224. }
    225. .two_container .two_item {
    226. width: 300px;
    227. height: 70px;
    228. margin: 30px 50px 0 0;
    229. display: flex;
    230. flex-direction: column;
    231. color: #666;
    232. }
    233. .two_container .two_item input {
    234. display: inline-block;
    235. height: 25px;
    236. margin-top: 10px;
    237. border-radius: 2px;
    238. border: 1px solid #4fb8e9;
    239. }
    240. .two_container .submit {
    241. width: 700px;
    242. background-color: #4fb8e9;
    243. color: #fff;
    244. height: 30px;
    245. line-height: 30px;
    246. text-align: center;
    247. margin: 0 auto;
    248. border-radius: 5px;
    249. margin-top: 5px;
    250. }
    251. footer {
    252. width: 100%;
    253. }
    254. footer .footer_top {
    255. height: 60px;
    256. background-color: #4fb8e9;
    257. }
    258. footer .bot_nav {
    259. display: flex;
    260. height: 60px;
    261. line-height: 40px;
    262. text-align: center;
    263. }
    264. footer .bot_nav a {
    265. flex: 1;
    266. color: #fff;
    267. width: 100%;
    268. height: 40px;
    269. line-height: 40px;
    270. }
    271. .footer_bottom {
    272. width: 100%;
    273. height: 300px;
    274. background-color: #eac1d7;
    275. }
    276. .footer_bottom .container {
    277. height: 100%;
    278. background: url(../img/footer4.png) no-repeat;
    279. }
    280. </style>
    281. <head>
    282. <meta charset="UTF-8">
    283. <meta http-equiv="X-UA-Compatible" content="IE=edge">
    284. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    285. <title>小猪佩奇</title>
    286. </head>
    287. <body>
    288. <header>
    289. <div class="container">
    290. <div class="nav_left">
    291. <div class="logo_text">
    292. <span>小猪佩奇</span>
    293. </div>
    294. </div>
    295. <div id="main">
    296. <ul id="list">
    297. <li>
    298. <a rel="nofollow" href="index.html">首页</a>
    299. </li>
    300. <li>
    301. <a rel="nofollow" href="../小猪佩奇/juese.html">角色介绍</a>
    302. </li>
    303. </ul>
    304. </div>
    305. </div>
    306. </header>
    307. <div class="banner">
    308. <img src="img/banner.jpg" alt="" class="map" style=" padding: 0;
    309. margin: 0;
    310. width: 100%;
    311. height: 400px;
    312. background-size: 100% 100%;
    313. position: relative;">
    314. <div class="container">
    315. <div class="nav">
    316. <a href="">猪爸爸</a>
    317. <a href="">猪妈妈</a>
    318. <a href="">佩奇</a>
    319. <a href="">乔治</a>
    320. </div>
    321. </div>
    322. </div>
    323. <div class="content">
    324. <div class="container">
    325. <div class="first_area">
    326. <P>小猪佩奇是一只可爱的粉色小猪,她与弟弟乔治、爸爸、妈妈快乐地住在一起。小猪佩奇最喜欢做的事情是玩游戏,打扮的漂漂亮亮,度假,以及住在小泥坑里快乐的跳上跳下。除了这些,她还喜欢到处探险,虽然有些时候会遇到一些小状况,但总可以化险为夷,而且都会带给大家意外的惊喜</P>
    327. <P>2022312日,据英国“天空”新闻网站称,俄罗斯一家法院裁定,俄罗斯企业可以使用小猪佩奇的商标而不受惩罚。
    328. “Rapsinews”新闻网等多家俄罗斯媒体11日也报道称,俄罗斯法院32日驳回了英国官方小猪佩奇商标及著作权全球权利人——娱乐壹英国有限公司(Entertainment One UK Limited)的上诉。
    329. 俄罗斯“Pravo.ru”网站报道称,这项裁定针对的是,娱乐壹英国有限公司起诉俄罗斯企业家伊万·科热夫尼科夫一案。娱乐壹英国有限公司要求科热夫尼科夫就使用“小猪佩奇”动画片中的角色形象赔偿20000卢布以及诉讼费用等。</P>
    330. <video width="320" height="240" controls autoplay>
    331. <source src="../小猪佩奇/img/视频/视频.mp4" type="video/mp4">
    332. <source src="../小猪佩奇/img/视频/视频.mp4" type="video/ogg">
    333. <source src="../小猪佩奇/img/视频/视频.mp4" type="video/webm">
    334. 您的浏览器不支持 video 属性。
    335. </video>
    336. <video width="320" height="240" controls autoplay>
    337. <source src="../小猪佩奇/img/视频/2.mp4" type="video/mp4">
    338. <source src="../小猪佩奇/img/视频/2.mp4" type="video/ogg">
    339. <source src="../小猪佩奇/img/视频/2.mp4" type="video/webm">
    340. 您的浏览器不支持 video 属性。
    341. </video>
    342. <img src="img/map.jpg" alt="" class="map">
    343. </div>
    344. <div class="tools">
    345. <div class="item">
    346. <span>猪爸爸猪妈妈信件箱</span>
    347. <img src="img/local.png" alt="">
    348. </div>
    349. <div class="item">
    350. <span>佩奇信件箱</span>
    351. <img src="img/tel.png" alt="">
    352. </div>
    353. <div class="item">
    354. <span>乔治信件箱子</span>
    355. <img src="img/earth.png" alt="">
    356. </div>
    357. </div>
    358. <div class="two_area">
    359. <div class="two_title">
    360. <img src="img/tel.png" alt=""> 在线留言
    361. </div>
    362. <div class="two_container">
    363. <div class="list">
    364. <div class="two_item">
    365. <span>昵称</span>
    366. <input type="text" height="30">
    367. </div>
    368. <div class="two_item">
    369. <span>地址</span>
    370. <input type="text">
    371. </div>
    372. <div class="two_item">
    373. <span>电话</span>
    374. <input type="text">
    375. </div>
    376. <div class="two_item">
    377. <span>留言</span>
    378. <input type="text">
    379. </div>
    380. </div>
    381. <div class="submit">提交</div>
    382. </div>
    383. </div>
    384. </div>
    385. </div>
    386. <footer>
    387. <div class="footer_top" id="main">
    388. <div>小猪佩奇</div>
    389. </footer>
    390. </body>
    391. </html>

    六、🥇 如何让学习不再盲目

    很多刚入门编程的小白学习了基础语法,却不知道语法的用途,不知道如何加深映像,不知道如何提升自己,这个时候每天刷自主刷一些题就非常重要(百炼成神),可以去牛客网上的编程初学者入门训练。该专题为编程入门级别,适合刚学完语法的小白练习,题目涉及编程基础语法,基本结构等,每道题带有练习模式和考试模式,可还原考试模式进行模拟,也可通过练习模式进行练习。

    七、🎁更多干货

    1.如果我的博客对你有帮助、如果你喜欢我的博客内容,请 “👍点赞” “✍️评论” “💙收藏” 一键三连哦!

    2.💗【👇🏻👇🏻👇🏻关注我| 获取更多源码 | 优质文章】 带您学习各种前端插件、3D炫酷效果、图片展示、文字效果、以及整站模板 、大学生毕业HTML模板 、期末大作业模板 、等! 「在这里有好多 前端 开发者,一起探讨 前端 Node 知识,互相学习」!

    3.以上内容技术相关问题💌欢迎一起交流学习👇🏻👇🏻👇🏻🔥源代码:
    :3021557545

    绿泡泡:XiaoMei_NN

    4.有任何意见或者不懂得地方可以在评论区留言,也可以私信,我会认真看也会回复的哦
    文出处链接和本声明。

  • 相关阅读:
    vue3:获取当前路由地址
    如何从rabbitmq集群中剔除某个节点以及如何将该节点加回集群
    QT:QSS自定义 QAbstractScrollArea实例
    【JAVA基础】String类概述
    μC/OS-II---计时器管理2(os_tmr.c)
    【音视频】C语言基础快速复习
    防火墙的安全机制
    ChatGPT 实际上是如何工作的?
    华为机试 - We Are A Team
    GCC:头文件和库文件的路径
  • 原文地址:https://blog.csdn.net/2301_78133614/article/details/139251825