0


【Web前端】彼岸の花——网上花店(网页制作)

本篇博客我们来做一个好看又简单的前端案例——彼岸的花网页界面。

这里是代码和网页素材,需要的自取:(提取码:7777)https://pan.baidu.com/s/1PH0TCuLpapPlJnczDcGkig?pwd=7777&_at_=1669882863950

一、案例图

二、源代码

2.1 html部分

  1. <body>
  2. <!--标题模块-->
  3. <div class="header">
  4. <h1><strong>彼岸の花</strong>&nbsp;&nbsp;<em>偏安一隅 静静生活</em></h1>
  5. <hr size="2" color="#d1d1d1" width="980px" />
  6. </div>
  7. <!--分类模块-->
  8. <div class="fenlei">
  9. <h2>商品分类 ></h2>
  10. <img src="banner.jpg" alt="网上花店" />
  11. <br /><br />
  12. <p>我喜欢一些花儿,静静地开放,从不声张。小小的花朵,有着异样的芬芳...</p>
  13. <p>I love flowers, quietly open, never quiet. Little flowers, with the same fragrance...</p>
  14. <br />
  15. </div>
  16. <!--热卖模块-->
  17. <div class="bestseller">
  18. <img src="bestseller1.png" alt="" />
  19. <br /><br />
  20. <img src="bestseller2.jpg" alt="" />
  21. <br /><br />
  22. <p class="txt">多肉植物是指植物营养器官肥大的高等植物,<em>通常具根、茎、叶三种营养器官和花、果实、种子三种繁殖器官</em>。在园艺上,又称肉质植物或多肉花卉,但以多肉植物这个名称最为常用。</p>
  23. <p class="txt"><em>全世界共有多肉植物一万余种</em>,它们绝大部分属于高等植物(绝大多数是被子植物)。植物上隶属几十个科,个别专家认为有67个科中含有多肉植物,但大多数专家认为只有50余科。</p>
  24. <br />
  25. </div>
  26. <!--页脚模块-->
  27. <div class="shouhou">
  28. 品质保障&nbsp;&nbsp;|&nbsp;&nbsp;七天无理由退换货&nbsp;&nbsp;|&nbsp;&nbsp;特色服务体验&nbsp;&nbsp;|&nbsp;&nbsp;帮助中心
  29. <br /><br />
  30. </div>
  31. <div class="boss">
  32. <img src="tuxiang.gif" alt="网上花店" align="left" />
  33. <h3>店主:Michael_唐僧</h3>
  34. <p>飞舞的花儿像一首诗 ?写着秋天的心事 ?带着相思 ?轻轻、轻轻 ?飘向大地 ?</p>
  35. <p>也许这只是秋季里的一场游戏 ?</p>
  36. <br /><br /><br />
  37. </div>
  38. </body>

2.2 css部分

  1. <style type="text/css">
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. }
  6. body {
  7. background-color: #ededed;
  8. font-family: "楷体";
  9. font-size: 16px;
  10. color: #a5a5a5;
  11. }
  12. .header {
  13. width: 980px;
  14. margin: 0 auto 7px;
  15. height: 86px;
  16. line-height: 86px;
  17. text-align: center;
  18. font-family: "微软雅黑";
  19. color: #a5a5a5;
  20. }
  21. .header h1 {
  22. font-weight: normal;
  23. }
  24. .header strong {
  25. font-weight: normal;
  26. font-size: 30px;
  27. }
  28. .header em {
  29. font-style: normal;
  30. font-size: 14px;
  31. }
  32. /*fenlei*/
  33. .fenlei {
  34. width: 980px;
  35. margin: 0 auto;
  36. }
  37. .fenlei h2 {
  38. font-size: 14px;
  39. font-family: "微软雅黑";
  40. color: #a5a5a5;
  41. height: 42px;
  42. line-height: 42px;
  43. }
  44. .fenlei p {
  45. line-height: 30px;
  46. text-align: center;
  47. font-size: 18px;
  48. }
  49. /*bestseller*/
  50. .bestseller {
  51. width: 602px;
  52. margin: 0 auto;
  53. }
  54. .bestseller .txt {
  55. line-height: 30px;
  56. text-indent: 2em;
  57. }
  58. .bestseller .txt em {
  59. font-style: normal;
  60. text-decoration: underline;
  61. }
  62. .shouhou {
  63. width: 602px;
  64. margin: 0 auto;
  65. text-align: center;
  66. font-family: "微软雅黑";
  67. font-size: 16px;
  68. font-weight: bold;
  69. }
  70. .boss {
  71. width: 602px;
  72. margin: 0 auto;
  73. }
  74. .boss h3,
  75. .boss p {
  76. text-indent: 2em;
  77. }
  78. .boss h3 {
  79. height: 30px;
  80. line-height: 30px;
  81. font-family: "微软雅黑";
  82. font-size: 18px;
  83. font-weight: normal;
  84. }
  85. .boss p {
  86. font-style: italic;
  87. line-height: 26px;
  88. font-size: 14px;
  89. }
  90. </style>

2.3 效果图

最近这几天在努力学习前端的课程,因为学校的前端课有点跟不上了,所以计划中的数据结构的博客得拖一拖了。

标签: 前端 html5 css3

本文转载自: https://blog.csdn.net/Brant_zero/article/details/124677328
版权归原作者 Brant_zero2022 所有, 如有侵权,请联系我们删除。

“【Web前端】彼岸の花——网上花店(网页制作)”的评论:

还没有评论