欢迎来到泰骏兴电子,大家有问题可以直接联系管理员QQ:233619809单片机 QQ群:59194556 各位游客也可以注册玩玩,享受更多权益。温馨提示:本网站仅提供平台学习以及渠道,一切后果自行承担,还望广大用户提高自我意识,请不要轻易相信他人,请不要轻易相信他人,请不要轻易相信他人。为了更好的管理论坛工作,所以现在使用邮箱注册,如果以前的邮箱不能修改的,请联系管理员代为修改

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 45|回复: 0

一个好看的页面

[复制链接]
发表于 2023-5-12 13:59:09 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
效果如图:



根据自己的需求修改



  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.         <title>我的页面</title>
  5.         <style>
  6.                 body {
  7.                         font-family: Arial, sans-serif;
  8.                         background-color: #f2f2f2;
  9.                         margin: 0;
  10.                         padding: 0;
  11.                 }

  12.                 .header {
  13.                         background-color: #003366;
  14.                         color: #ffffff;
  15.                         text-align: center;
  16.                         padding: 20px;
  17.                         font-size: 24px;
  18.                 }

  19.                 .container {
  20.                         width: 80%;
  21.                         margin: 0 auto;
  22.                         padding: 40px 20px;
  23.                         background-color: #ffffff;
  24.                         box-shadow: 0 0 10px rgba(0,0,0,0.3);
  25.                 }

  26.                 .main {
  27.                         display: flex;
  28.                         flex-wrap: wrap;
  29.                         justify-content: space-between;
  30.                         margin-top: 40px;
  31.                 }

  32.                 .card {
  33.                         flex-basis: 30%;
  34.                         margin-bottom: 20px;
  35.                         border-radius: 5px;
  36.                         background-color: #f2f2f2;
  37.                         box-shadow: 0 0 5px rgba(0,0,0,0.1);
  38.                         transition: all 0.3s ease-in-out;
  39.                 }

  40.                 .card:hover {
  41.                         box-shadow: 0 0 10px rgba(0,0,0,0.3);
  42.                         transform: translateY(-5px);
  43.                 }

  44.                 .card img {
  45.                         width: 100%;
  46.                         border-radius: 5px 5px 0 0;
  47.                 }

  48.                 .card h3 {
  49.                         font-size: 20px;
  50.                         margin: 0;
  51.                         padding: 10px;
  52.                 }

  53.                 .card p {
  54.                         font-size: 16px;
  55.                         margin-bottom: 10px;
  56.                         padding: 0 10px;
  57.                 }

  58.                 .button {
  59.                         display: block;
  60.                         padding: 10px 20px;
  61.                         background-color: #003366;
  62.                         color: #ffffff;
  63.                         border-radius: 5px;
  64.                         text-align: center;
  65.                         text-decoration: none;
  66.                         transition: all 0.3s ease-in-out;
  67.                 }

  68.                 .button:hover {
  69.                         background-color: #0059b3;
  70.                         transform: translateX(5px);
  71.                 }

  72.                 .footer {
  73.                         background-color: #003366;
  74.                         color: #ffffff;
  75.                         text-align: center;
  76.                         padding: 20px;
  77.                         font-size: 14px;
  78.                 }
  79.         </style>
  80. </head>
  81. <body>
  82.         <header class="header">
  83.                 <h1>我的页面</h1>
  84.         </header>
  85.         <div class="container">
  86.                 <div class="main">
  87.                         <div class="card">
  88.                                 <img src="https://via.placeholder.com/300x200" alt="图片">
  89.                                 <h3>卡片标题</h3>
  90.                                 <p>这是一段描述性文本,用于描述卡片内容</p>
  91.                                 <a href="#" class="button">查看详情</a>
  92.                         </div>
  93.                         <div class="card">
  94.                                 <img src="https://via.placeholder.com/300x200" alt="图片">
  95.                                 <h3>卡片标题</h3>
  96.                                 <p>这是一段描述性文本,用于描述卡片内容</p>
  97.                                 <a href="#" class="button">查看详情</a>
  98.                         </div>
  99.                         <div class="card">
  100.                                 <img src="https://via.placeholder.com/300x200" alt="图片">
  101.                                 <h3>卡片标题</h3>
  102.                                 <p>这是一段描述性文本,用于描述卡片内容</p>
  103.                                 <a href="#" class="button">查看详情</a>
  104.                         </div>
  105.                 </div>
  106.         </div>
  107.         <footer class="footer">
  108.                 <p>&copy; 2021 我的页面</p>
  109.         </footer>
  110. </body>
  111. </html>
复制代码




高级模式
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|泰骏兴电子科技有限公司 ( 粤ICP备2023060260号-1 ) 单片机爱好者

GMT+8, 2025-10-31 17:27

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表