ToB企服应用市场:ToB评测及商务社交产业平台

标题: HTML-CSS练习例子 [打印本页]

作者: 九天猎人    时间: 2024-6-11 09:22
标题: HTML-CSS练习例子
HTML CSS 练习

https://icodethis.com

   作为前端练习生。不敲代码只看,入门是很慢的,所以直接实战是学习前端最快的途径之一。 这个网站练习HTML
CSS的,可以打开了解一下,可以每天打卡,例子简单,循序渐进,计划的也比力悦目。
  下面是练习,当然布局的方法有很多,下面是一种。
01基础

这是第一个练习,但是很多大佬做出了,很多不一样的效果
比如:


计划稿


代码

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="UTF-8">
  5.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.   <title>基础练习</title>
  7.   <style>
  8.     .main {
  9.       width: 400px;
  10.       height: 100%;
  11.       margin: 0 auto;
  12.       /* padding-top: 30px; */
  13.       padding: 0 10px;
  14.       /* background-color: rgba(241, 77, 186, 0.5); */
  15.     }
  16.     .content {
  17.       padding-top: 30px;
  18.     }
  19.     p {
  20.       margin: 0;
  21.     }
  22.     .group {
  23.       margin-top: 15px;
  24.     }
  25.     .title {
  26.       display: inline-block;
  27.       /* padding: 5px ; */
  28.       font-size: 15px;
  29.       font-weight: 600;
  30.       text-align: center;
  31.       padding: 0 10px;
  32.       /* margin-bottom: 20px; */
  33.       box-shadow: 0 2px 3px #7b7878;
  34.       border-radius: 3px;
  35.       background-color: #d9d9d9;
  36.     }
  37.     .my-custom-font-Arial {
  38.       /* @font-face 加载外部字体 */
  39.       /* 'Artal': 这是首选的字体,也就是开发者希望文本显示的字体。'Artal'是一个具体的字体名称,假设它是一个自定义字体或者是用户系统中已安装的字体。如果浏览器在用户的系统中找到了这个字体,它就会使用这个字体来渲染文本。 */
  40.       font-family: 'Arial', sans-serif;
  41.     }
  42.     .my-custom-font-Roman {
  43.       font-family: 'Roman', sans-serif;
  44.     }
  45.     .font-underlined {
  46.       text-decoration: underline;
  47.     }
  48.     .font-through {
  49.       text-decoration: line-through;
  50.     }
  51.     h1,
  52.     h2,
  53.     h3 {
  54.       margin: 0;
  55.     }
  56.     .color-box {
  57.       margin-top: 10px;
  58.     }
  59.     .color-orange {
  60.       color: #ee5531;
  61.     }
  62.     .square {
  63.       width: 50px;
  64.       height: 50px;
  65.       background-color: #ee5531;
  66.     }
  67.     .color-purple {
  68.       color: #4621ab;
  69.     }
  70.     .circular {
  71.       width: 50px;
  72.       height: 50px;
  73.       border-radius: 50%;
  74.       background-color: #4621ab;
  75.     }
  76.     h6 {
  77.       margin: 0;
  78.       margin-bottom: 3px;
  79.     }
  80.     .button-box {
  81.       margin-top: 10px;
  82.     }
  83.     button {
  84.       display: inline-block;
  85.       width: 150px;
  86.       height: 30px;
  87.       border: none;
  88.       color: #fff;
  89.       background-color: #4621ab;
  90.       border-radius: 2px;
  91.     }
  92.     /* 鼠标悬停时 */
  93.     button:hover {
  94.       background-color: #866cdc;
  95.     }
  96.     /* 点击时(按下状态) */
  97.     button:active {
  98.       background-color: #cfc4f1;
  99.     }
  100.   </style>
  101. </head>
  102. <body>
  103.   <div class="main">
  104.     <div class="content">
  105.       <!-- TYPOGRAPHY -->
  106.       <div class="title">TYPOGRAPHY</div>
  107.       <div>
  108.         <div class="group">
  109.           <p><strong>Make me bold</strong></p>
  110.           <p><em>Make me italic</em></p>
  111.         </div>
  112.         <div class="group">
  113.           <p class="my-custom-font-Arial">I'm from the Artal font famil!</p>
  114.           <p class="my-custom-font-Roman">And I'm frorm the Times New Ronan fot family! .</p>
  115.         </div>
  116.         <div class="group">
  117.           <p class="font-underlined">Make this text be underlined</p>
  118.           <p class="font-through">And put a Hine through this one</p>
  119.         </div>
  120.       </div>
  121.     </div>
  122.     <div class="content">
  123.       <!-- HEADINGS -->
  124.       <div class="title">HEADINGS</div>
  125.       <div>
  126.         <div>
  127.           <h1>This isa &lt;h1&gt; tag</h1>
  128.           <h2>This isa&lt;h2&gt;tag</h2>
  129.           <h3>This isa &lt;h3&gt;tag</h3>
  130.         </div>
  131.       </div>
  132.     </div>
  133.     <div class="content">
  134.       <!-- COLORS -->
  135.       <div class="title">COLORS</div>
  136.       <div>
  137.         <div class="color-box">
  138.           <div class="color-orange">Color me orange!</div>
  139.           <div class="color-orange square"></div>
  140.         </div>
  141.         <div class="color-box">
  142.           <div class="color-purple">Color me purple!</div>
  143.           <div class="color-purple circular"></div>
  144.         </div>
  145.       </div>
  146.     </div>
  147.     <div class="content">
  148.       <!-- BUTTONS -->
  149.       <div class="title">BUTTONS</div>
  150.       <div>
  151.         <div class="button-box">
  152.           <h6>Defult</h6>
  153.           <button>Button</button>
  154.         </div>
  155.         <div class="button-box">
  156.           <h6>Hovered</h6>
  157.           <button>Button</button>
  158.         </div>
  159.         <div class="button-box">
  160.           <h6>Active</h6>
  161.           <button>Button</button>
  162.         </div>
  163.       </div>
  164.     </div>
  165.   </div>
  166. </body>
  167. </html>
复制代码
02_404页面

计划搞


代码

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="UTF-8">
  5.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.   <title>Document</title>
  7.   <style>
  8.     .main {
  9.       /* border: 1px solid #000; */
  10.       position: relative;
  11.       width: 100%;
  12.       /* 或者设置一个固定宽度 */
  13.       height: 100%;
  14.       /* 或者设置一个固定高度 */
  15.     }
  16.     .main-box {
  17.       position: absolute;
  18.       top: 50%;
  19.       /* 使子元素的上边缘位于父元素的中心 */
  20.       left: 50%;
  21.       /* 使子元素的左边缘位于父元素的中心 */
  22.       transform: translate(-50%, 20%);
  23.       /* 调整位置,使其居中 */
  24.       display: flex;
  25.       flex-direction: column;
  26.       align-items: center;
  27.       width: 800px;
  28.       height: 500px;
  29.       /* margin: 100px auto; */
  30.       /* background-color: rgba(241, 77, 186, 0.5); */
  31.       background-image: linear-gradient(to right, #f073c6, #ff6b96);
  32.       border-radius: 8px;
  33.       border: 2px solid black;
  34.       box-shadow: 0 8px 15px rgba(230, 41, 135, 0.5);
  35.     }
  36.     .content {
  37.       width: 50%;
  38.       text-align: center;
  39.       color: #fff;
  40.       /* background-color: rgb(227, 153, 57);
  41.       border: 1px solid black; */
  42.     }
  43.     .one {
  44.       margin: 50px 0;
  45.     }
  46.     .two {
  47.       margin: 0 0 20px 0;
  48.       font-size: 100px;
  49.       font-weight: 700;
  50.     }
  51.     .three {
  52.       margin: 0 0 30px 0;
  53.     }
  54.     .four {
  55.       vertical-align: bottom;
  56.     }
  57.     a {
  58.       color: #fff;
  59.       text-decoration: none;
  60.       border-bottom: 1px solid #fff;
  61.     }
  62.     .circular-box {
  63.       position: absolute;
  64.       width: 800px;
  65.       height: 500px;
  66.       top: 50%;
  67.       /* 使子元素的上边缘位于父元素的中心 */
  68.       left: 50%;
  69.       /* 使子元素的左边缘位于父元素的中心 */
  70.       transform: translate(-50%, 20%);
  71.       /* 调整位置,使其居中 */
  72.       background-color: rgba(241, 77, 186, 0.2);
  73.       overflow: hidden;
  74.     }
  75.     .circular {
  76.       width: 100px;
  77.       height: 100px;
  78.       border-radius: 50%;
  79.       /* background-color: #fff; */
  80.     }
  81.     .circular-box> :nth-child(1) {
  82.       width: 200px;
  83.       height: 200px;
  84.       position: absolute;
  85.       top: 70%;
  86.       /* 使子元素的上边缘位于父元素的中心 */
  87.       left: -5%;
  88.       background-image: linear-gradient(55deg, rgba(255, 255, 255, 0.137), rgba(242, 114, 193, 0.342));
  89.     }
  90.     .circular-box> :nth-child(2) {
  91.       width: 300px;
  92.       height: 300px;
  93.       position: absolute;
  94.       top: -10%;
  95.       /* 使子元素的上边缘位于父元素的中心 */
  96.       left: 75%;
  97.       background-image: linear-gradient(-55deg, rgba(255, 255, 255, 0.137), rgba(242, 114, 193, 0.342));
  98.     }
  99.     .circular-box> :nth-child(3) {
  100.       width: 100px;
  101.       height: 100px;
  102.       position: absolute;
  103.       top: 60%;
  104.       /* 使子元素的上边缘位于父元素的中心 */
  105.       left: 75%;
  106.       background-image: linear-gradient(328deg, rgba(255, 255, 255, 0.137), rgba(242, 114, 193, 0.342));
  107.     }
  108.   </style>
  109. </head>
  110. <body>
  111.   <div class="main">
  112.     <div class="main-box">
  113.       <div class="content one">UIDesignDally</div>
  114.       <div class="content two">404</div>
  115.       <div class="content three">The link you clicked may be broken or the<br/>
  116.         page may have been removed.</div>
  117.       <div class="content four">Visit the <a href="">home page</a> or <a href="">contact</a>me</div>
  118.     </div>
  119.     <div class="circular-box">
  120.       <div class="circular"></div>
  121.       <div class="circular"></div>
  122.       <div class="circular"></div>
  123.     </div>
  124.   </div>
  125. </body>
  126. </html>
复制代码
代码2

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="UTF-8">
  5.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.   <title>Document</title>
  7.   <link rel="stylesheet" href="./index2.css">
  8. </head>
  9. <body>
  10.   <div class="container">
  11.     <div class="content">
  12.       <div class="circle1"></div>
  13.       <div class="circle2"></div>
  14.       <div class="circle3"></div>
  15.       <p>UIDesignDaily</p>
  16.       <h1>404</h1>
  17.       <h3>The link you clicked may be broken or the <br> page may have been removed.</h3>
  18.       <h5>Visit the <a href="">home page</a> or <a href="">contact</a> me</h5>
  19.     </div>
  20.   </div>
  21. </body>
  22. </html>
复制代码
  1. /*index2.css*/
  2. body{
  3.   margin: 0;
  4.   padding: 0;
  5. }
  6. .container{
  7.   position: absolute;
  8.   top: 0;
  9.   left: 0;
  10.   bottom: 0;
  11.   right: 0;
  12.   display: flex;
  13.   justify-content: center;
  14.   align-items: center;
  15. }
  16. .content{
  17.   overflow: hidden;
  18.   width:95%;
  19.   height: calc(80%/1.4);
  20.   background-image: linear-gradient(90deg, rgb(239,115,199), rgb(255,106,149));
  21.   border: 3px solid rgb(36,46,76);
  22.   border-radius: 13px;
  23.   display:flex;
  24.   flex-direction: column;
  25.   align-items: center;
  26.   position: relative;
  27.   box-shadow: 2px 10px 10px rgba(239, 115, 200, 0.534);
  28. }
  29. .circle1{
  30.   width:250px;
  31.   height: 250px;
  32.   background-image: linear-gradient(270deg, rgba(255, 255, 255, 0.308), rgba(242, 114, 193, 0));
  33.   border-radius: 250px;
  34.   position:absolute;
  35.   left:-40px;
  36.   top:300px;
  37. }
  38. .circle2{
  39.   width:250px;
  40.   height: 250px;
  41.   background-image: linear-gradient(270deg, rgba(255, 255, 255, 0.308), rgba(242, 114, 193, 0));
  42.   border-radius: 250px;
  43.   position:absolute;
  44.   right:-70px;
  45.   top:-50px;
  46. }
  47. .circle3{
  48.   width:70px;
  49.   height: 70px;
  50.   background-image: linear-gradient(270deg, rgba(255, 255, 255, 0.308), rgba(242, 114, 193, 0));
  51.   border-radius: 70px;
  52.   position:absolute;
  53.   left:70%;
  54.   top:50%;
  55. }
  56. p{
  57.   font-size: 10px;
  58.   padding-top: 50px;
  59.   font-family:'Open Sans';
  60.   color:rgba(255, 255, 255, 0.719);
  61. }
  62. h1{
  63.   font-size: 120px;
  64.   font-weight: 600;
  65.   font-family:'Open Sans';
  66.   color:white;
  67. }
  68. h3{
  69.   font-size: 11px;
  70.   font-weight: 501;
  71.   text-align: center;
  72.   font-family:'Open Sans';
  73.   color:rgba(255, 255, 255, 0.685);
  74. }
  75. h5{
  76.   font-size: 10px;
  77.   padding-top: 30px;
  78.   font-family:'Open Sans';
  79.   color:rgba(255, 255, 255, 0.664);
  80. }
  81. a{
  82.   text-decoration: underline;
  83. }
复制代码
03_Christmas Promo

计划稿


代码

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="UTF-8">
  5.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.   <title>Document</title>
  7. </head>
  8. <body>
  9.   <div class="container">
  10.     <div class="content">
  11.       <div class="x"></div>
  12.       <img src="https://i.postimg.cc/J0GVNJFy/tree.png" alt="">
  13.       <h5>Merry Christmas !</h5>
  14.       <p class="tasks">You completed all your Decenber's tasks<br />
  15.         50 we decided to get you a gift:</p>
  16.       <p class="plan">50% off on your Yearly Premium Plan</p>
  17.       <button>GET YOUR GIFT</button>
  18.     </div>
  19.   </div>
  20. </body>
  21. </html>
复制代码
  1. /* Write your CSS code here */body {
  2.     padding: 0;
  3.     margin: 0;
  4. }
  5. .container {
  6.     position: absolute;
  7.     top: 0;
  8.     left: 0;
  9.     bottom: 0;
  10.     right: 0;
  11.     display: flex;
  12.     justify-content: center;
  13.     align-items: center;
  14.     background-color: #eff0f3;
  15.     /* border: 1px solid red;   */
  16. }
  17. .content {
  18.     position: relative;
  19.     background-color: #fff;
  20.     width: 400px;
  21.     height: 450px;
  22.     border-radius: 4px;
  23.     border-top-right-radius: 15px;
  24.     display: flex;
  25.     flex-direction: column;
  26.     align-items: center;
  27.     box-shadow: 4px 10px 10px rgba(53, 64, 99, 0.1);
  28. }
  29. .x {
  30.     position: absolute;
  31.     width: 10px;
  32.     height: 10px;
  33.     right: 20px;
  34.     top: 20px;
  35.     font-size: 20px;
  36.     transform: rotate(45deg);
  37. }
  38. .x::after,
  39. .x::before {
  40.     content: '';
  41.     position: absolute;
  42.     width: 20px;
  43.     height: 2px;
  44.     background-color: rgb(123, 122, 122);
  45.     top: 50%;
  46.     left: 50%;
  47.     transform: translate(-50%, -50%);
  48. }
  49. .x::before {
  50.     transform: translate(-50%, -50%) rotate(90deg);
  51. }
  52. img {
  53.     margin-top: 70px;
  54.     width: 100px;
  55.     height: 130px;
  56. }
  57. /* .tasks{
  58.   text-align: center;
  59. } */
  60. .tasks {
  61.     font-size: 12px;
  62.     color: rgb(126, 125, 123);
  63.     text-align: center;
  64. }
  65. .plan {
  66.     color: orange;
  67.     font-size: 13px;
  68. }
  69. button {
  70.     color: white;
  71.     width: 170px;
  72.     height: 40px;
  73.     margin: 30px;
  74.     font-size: 12px;
  75.     background-color: #242e4c;
  76.     border-radius: 5px;
  77.     box-shadow: 1px 5px 5px rgba(36, 46, 76, 0.5);
  78. }
复制代码
04_Subscribe

计划稿


代码

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="UTF-8">
  5.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.   <title>Document</title>
  7.   <link rel="stylesheet" href="./index.css">
  8. </head>
  9. <body>
  10.   <div class="container">
  11.     <div class="content">
  12.       <h4>Let's keep in touch</h4>
  13.       <p class="Subscribe">Subscribe to keep up with fresh news and exciting updates.<br />
  14.         We promise not to spam youl!</p>
  15.       <form action="">
  16.         <input class="email" type="text" placeholder="Enter your email address">
  17.         <button class="email-button">SEND &nbsp; →</button>
  18.       </form>
  19.       <p class="checkbox-box">
  20.         <input id="checkbox1" class="input-checkbox" type="checkbox">
  21.         <label for="checkbox1">I agree to my email address being stored and<br />used to reccive monthly ncwsletter.</label>
  22.       </p>
  23.     </div>
  24.   </div>
  25. </body>
  26. </html>
复制代码
  1. body {
  2.   padding: 0;
  3.   margin: 0;
  4. }
  5. .container {
  6.   position: absolute;
  7.   top: 0;
  8.   left: 0;
  9.   bottom: 0;
  10.   right: 0;
  11.   display: flex;
  12.   justify-content: center;
  13.   align-items: center;
  14.   background-color: #f2f5f8;
  15.   /* border: 1px solid red; */
  16. }
  17. .content {
  18.   /* position: relative; */
  19.   background-color: #fff;
  20.   width: 600px;
  21.   height: 300px;
  22.   border-radius: 7px;
  23.   box-shadow: 0px 10px 10px rgba(61, 159, 255, 0.1);
  24.   display: flex;
  25.   flex-direction: column;
  26.   align-items: center;
  27. }
  28. .Subscribe {
  29.   font-size: 14px;
  30.   text-align: center;
  31. }
  32. .email {
  33.   width: 230px;
  34.   height: 35px;
  35.   border-radius: 5px;
  36.   padding-left: 15px;
  37.   margin-right: 5px;
  38.   margin-top: 20px;
  39.   border: 1px solid rgb(212, 214, 217);
  40. }
  41. .email-button {
  42.   width: 150px;
  43.   height: 40px;
  44.   color: #fff;
  45.   font-size: 13px;
  46.   border-radius: 5px;
  47.   border: 1px solid rgb(212, 214, 217);
  48.   background-color: rgb(61, 159, 255);
  49.   box-shadow: 0px 5px 5px rgba(61, 159, 255, 0.3);
  50. }
  51. .email-button:hover {
  52.   background-color: rgb(12, 122, 231);
  53.   box-shadow: 0px 5px 5px rgba(61, 159, 255, 0.3);
  54. }
  55. .checkbox-box {
  56.   margin-left: -110px;
  57. }
  58. .input-checkbox {
  59.   display: none;
  60.   /* 隐藏原生的checkbox ,自定义checkbox*/
  61. }
  62. .checkbox-box label {
  63.   position: relative;
  64.   padding-left: 10px;
  65.   cursor: pointer;
  66.   display: inline-block;
  67.   font-size: 12px;
  68.   color: #787f85;
  69. }
  70. .checkbox-box label:before {
  71.   content: '';
  72.   position: absolute;
  73.   left: -15px;
  74.   top: 0;
  75.   width: 15px;
  76.   height: 15px;
  77.   border: 1px solid rgb(212, 214, 217);
  78.   border-radius: 3px;
  79. }
  80.    /* 当checkbox被选中时的样式 */
  81.    .checkbox-box input[type="checkbox"]:checked+label:before {
  82.     background-color: #3d9fff;
  83.     /* 背景颜色,可选 */
  84. }
  85. .checkbox-box input[type="checkbox"]:checked+label:after {
  86.   content: "\2713";
  87.   position: absolute;
  88.   left: -12px;
  89.   top: 0px;
  90.   color: #fff;
  91.   font-size: 14px;
  92.   font-weight: bold;
  93. }
复制代码
05_Toasts

计划稿


  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="UTF-8">
  5.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.   <title>Document</title>
  7.   <link rel="stylesheet" href="./index2.css">
  8. </head>
  9. <body>
  10.   <section class="toast-wrapper">
  11.     <div class="toast">
  12.       <div class="icon-wrapper">
  13.           <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
  14.               stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  15.               class="icon icon-tabler icons-tabler-outline icon-tabler-check">
  16.               <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  17.               <path d="M5 12l5 5l10 -10" />
  18.           </svg>
  19.       </div>
  20.       <p>File has been removerd succesfully!</p>
  21.       <button class="close-btn">
  22.           <svg  xmlns="http://www.w3.org/2000/svg"  width="24"  height="24"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="2"  stroke-linecap="round"  stroke-linejoin="round"  class="icon icon-tabler icons-tabler-outline icon-tabler-x"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>
  23.       </button>
  24.   </div>
  25.     <div class="toast toast-dark">
  26.       <div class="icon-wrapper">
  27.         <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  28.           stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  29.           class="icon icon-tabler icons-tabler-outline icon-tabler-check">
  30.           <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  31.           <path d="M5 12l5 5l10 -10" />
  32.         </svg>
  33.       </div>
  34.       <p>File has been removerd succesfully!</p>
  35.       <button class="close-btn">
  36.         <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  37.           stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  38.           class="icon icon-tabler icons-tabler-outline icon-tabler-x">
  39.           <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  40.           <path d="M18 6l-12 12" />
  41.           <path d="M6 6l12 12" />
  42.         </svg>
  43.       </button>
  44.     </div>
  45.     <div class="toast toast-rounded">
  46.       <div class="icon-wrapper">
  47.         <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  48.           stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  49.           class="icon icon-tabler icons-tabler-outline icon-tabler-check">
  50.           <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  51.           <path d="M5 12l5 5l10 -10" />
  52.         </svg>
  53.       </div>
  54.       <p>File has been removerd succesfully!</p>
  55.       <button class="close-btn">
  56.         <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  57.           stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  58.           class="icon icon-tabler icons-tabler-outline icon-tabler-x">
  59.           <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  60.           <path d="M18 6l-12 12" />
  61.           <path d="M6 6l12 12" />
  62.         </svg>
  63.       </button>
  64.     </div>
  65.     <div class="toast toast-dark toast-rounded">
  66.       <div class="icon-wrapper">
  67.         <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  68.           stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  69.           class="icon icon-tabler icons-tabler-outline icon-tabler-check">
  70.           <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  71.           <path d="M5 12l5 5l10 -10" />
  72.         </svg>
  73.       </div>
  74.       <p>File has been removerd succesfully!</p>
  75.       <button class="close-btn">
  76.         <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  77.           stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  78.           class="icon icon-tabler icons-tabler-outline icon-tabler-x">
  79.           <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  80.           <path d="M18 6l-12 12" />
  81.           <path d="M6 6l12 12" />
  82.         </svg>
  83.       </button>
  84.     </div>
  85.     <div class="toast toast-loading">
  86.       <div class="icon-wrapper">
  87.         <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  88.           stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  89.           class="icon icon-tabler icons-tabler-outline icon-tabler-check">
  90.           <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  91.           <path d="M5 12l5 5l10 -10" />
  92.         </svg>
  93.       </div>
  94.       <p>File has been removerd succesfully!</p>
  95.     </div>
  96.     <div class="toast toast-dark toast-loading">
  97.       <div class="icon-wrapper">
  98.         <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  99.           stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  100.           class="icon icon-tabler icons-tabler-outline icon-tabler-check">
  101.           <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  102.           <path d="M5 12l5 5l10 -10" />
  103.         </svg>
  104.       </div>
  105.       <p>File has been removerd succesfully!</p>
  106.     </div>
  107.   </section>
  108. </body>
  109. </html>
复制代码
代码

  1. *{
  2.   box-sizing: border-box;
  3. }
  4. body{
  5.   background: #f5edfd;
  6.   font-family: 'Poppins', sans-serif;
  7.   display: flex;
  8.   align-items: center;
  9.   justify-content: center;
  10.   margin: 0;
  11.   min-height: 100vh;
  12. }
  13. .toast-wrapper{
  14.   display: flex;
  15.   flex-direction: column;
  16.   gap: 2rem;
  17.   width: 100%;
  18.   max-width: 800px;
  19. }
  20. .toast{
  21.   background: #ffffff;
  22.   box-shadow: 0 5px 5px -4px rgba(0, 0, 0, 0.3);
  23.   color: #110024;
  24.   display: flex;
  25.   align-items: center;
  26.   gap: 1rem;
  27.   padding: 0.5rem 1rem;
  28.   width: 100%;
  29. }
  30. .toast-dark{
  31.   background: #110024;
  32.   color: #ffffff;
  33. }
  34. .toast.toast-rounded{
  35.   border-radius: 50px;
  36. }
  37. .toast.toast-loading{
  38.   --loading-width: 40%;
  39.   position: relative;
  40.   justify-content: center;
  41. }
  42. .toast.toast-loading::after{
  43.   content: '';
  44.   background: #110024;
  45.   position: absolute;
  46.   bottom: 0;
  47.   left: 0;
  48.   height: 3px;
  49.   width: var(--loading-width);
  50. }
  51. .toast.toast-dark.toast-loading::after{
  52.   background: #ffffff;
  53. }
  54. .toast .icon-wrapper{
  55.   background: #2ca12c;
  56.   border-radius: 50%;
  57.   color: #ffffff;
  58.   display: flex;
  59.   align-items: center;
  60.   justify-content: center;
  61.   height: 36px;
  62.   width: 36px;
  63. }
  64. .toast-dark .icon-wrapper{
  65.   background: #ffffff;
  66.   color: #2ca12c;
  67. }
  68. .toast .close-btn{
  69.   background: none;
  70.   border: none;
  71.   color: #9b9b9b;
  72.   cursor: pointer;
  73.   margin-left: auto;
  74.   padding: 0;
  75. }
复制代码
06_BirthdayList

计划稿


代码

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="UTF-8">
  5.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.   <title>Document</title>
  7.   <link rel="stylesheet" href="./index.css">
  8. </head>
  9. <body>
  10.   <section class="list-wrapper">
  11.     <h3 class="list">24 birthdays today</h3>
  12.     <div class="list"> <img src="./image1.png" alt=""><div class="list-name"><span>Bertie Yates</span> <span>29 years</span></div></div>
  13.     <div class="list"> <img src="./image1.png" alt=""><div class="list-name"><span>Hester Hogan</span> <span>32 years</span></div></div>
  14.     <div class="list"> <img src="./image1.png" alt=""><div class="list-name"><span>LorryLttle</span> <span>32 years</span></div></div>
  15.     <div class="list"> <img src="./image1.png" alt=""><div class="list-name"><span>Bertie Yates</span> <span>29 years</span></div></div>
  16.     <div class="list"> <img src="./image1.png" alt=""><div class="list-name"><span>Bertie Yates</span> <span>29 years</span></div></div>
  17.     <div class="list"><button>View all</button></div>
  18.   </section>
  19. </body>
  20. </html>
复制代码
  1. * {
  2.     box-sizing: border-box;
  3. }
  4. body {
  5.     background: #f089b1;
  6.     display: flex;
  7.     align-items: center;
  8.     justify-content: center;
  9.     margin: 0;
  10.     min-height: 100vh;
  11. }
  12. .list-wrapper {
  13.     display: flex;
  14.     flex-direction: column;
  15.     align-items: flex-start;
  16.     padding: 40px;
  17.     background: #fff;
  18.     border-radius: 0.5rem;
  19.     box-shadow: 70px 50px 40px rgb(226, 112, 158);
  20.     gap: 1.2rem;
  21.     width: 30%;
  22.     /* height: 30rem; */
  23.     max-width: 700px;
  24.     overflow: hidden;
  25. }
  26. h3 {
  27.     font-weight: normal;
  28.     white-space: nowrap;
  29.     margin: 0;
  30. }
  31. .list {
  32.     width: 100%;
  33.     display: flex;
  34.     align-items: center;
  35. }
  36. .list img {
  37.     min-width: 25px;
  38.     height: 25px;
  39.     border-radius: 50%;
  40.     background-color: aqua;
  41.     margin-right: 8px;
  42. }
  43. .list-name {
  44.     display: flex;
  45.     flex-direction: column;
  46. }
  47. .list-name span:nth-of-type(2) {
  48.     font-size: 13px;
  49.     color: #9b9899;
  50. }
  51. button {
  52.     width: 100%;
  53.     height: 40px;
  54.     color: #fff;
  55.     border: none;
  56.     border-radius: 0.2em;
  57.     background-image: linear-gradient(to right, #e76ecf, #fe69a4);
  58.     box-shadow: 0px 5px 4px rgba(246, 89, 194, 0.3);
  59. }
复制代码
07_Pricing Table

计划稿


代码

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="UTF-8">
  5.   <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.   <title>Document</title>
  7.   <link rel="stylesheet" href="./index.css">
  8. </head>
  9. <body>
  10.   <div class="table-wrapper">
  11.     <div class="halo purple"></div>
  12.     <div class="halo blue"></div>
  13.     <div class="halo yellow"></div>
  14.   
  15.     <ul class="table-list">
  16.       <li>
  17.         <h3>Free</h3>
  18.         <div class="list-price"><span><span>$</span> <span>0</span></span></div>
  19.         <p class="list-pack">Free oyour whole team</p>
  20.         <p>For individuals or teams looking to organize anything.</p>
  21.         <button>Get started</button>
  22.       </li>
  23.       <li>
  24.         <h3>Standard</h3>
  25.         <div class="list-price"><span><span>$</span> <span>6</span></span></div>
  26.         <p class="list-pack">Peruser per month</p>
  27.         <p>For teams that need to manage more work.</p>
  28.         <button>Upgrade Now</button>
  29.       </li>
  30.       <li>
  31.         <h3>Premium</h3>
  32.         <div class="list-price"><span><span>$</span> <span>12</span></span></div>
  33.         <p class="list-pack">Peruser per month</p>
  34.         <p>Best for teams that need to track multiple projects.</p>
  35.         <button>Try for free</button>
  36.       </li>
  37.     </ul>
  38.   </div>
  39. </body>
  40. </html>
复制代码
  1. * {
  2.   box-sizing: border-box;
  3. }
  4. body {
  5.   background-color: #f5f8ff;
  6.   display: flex;
  7.   align-items: center;
  8.   justify-content: center;
  9.   margin: 0;
  10.   min-height: 100vh;
  11. }
  12. li {
  13.   list-style: none;
  14.   /* 移除列表项前的符号 */
  15.   margin: 0;
  16.   /* 重置外边距 */
  17.   padding: 0;
  18.   /* 重置内边距 */
  19. }
  20. .table-wrapper {
  21.   position: relative;
  22.   min-height: 50vh;
  23.   min-width: 625px;
  24.   border: 15px solid #fff;
  25.   border-radius: 10px;
  26.   background-color: rgba(255, 255, 255, .7);
  27.   /* overflow: hidden; */
  28. }
  29. .table-list {
  30.   display: flex;
  31.   gap: 2rem;
  32.   max-width: 800px;
  33. }
  34. .list-price span:nth-of-type(1) {
  35.   font-size: 20px;
  36.   font-weight: bold;
  37. }
  38. .list-price span:nth-of-type(2) {
  39.   font-size: 40px;
  40.   font-weight: bold;
  41. }
  42. p {
  43.   font-size: 18px;
  44. }
  45. .list-pack {
  46.   margin: 0;
  47.   font-size: 12px;
  48. }
  49. button {
  50.   border: none;
  51.   width: 7rem;
  52.   height: 40px;
  53.   border-radius: 5px;
  54. }
  55. .table-list li:nth-of-type(1) button {
  56.   background-color: #edbbff;
  57. }
  58. .table-list li:nth-of-type(2) button {
  59.   background-color: #aef1f5;
  60. }
  61. .table-list li:nth-of-type(3) button {
  62.   background-color: #ffddb6;
  63. }
  64. .halo {
  65.   position: absolute;
  66.   top: 4rem;
  67.   left: 20rem;
  68.   /* background-color: #edbbff; */
  69.   width: 15rem;
  70.   height: 15rem;
  71.   border-radius: 50%;
  72. }
  73. .purple {
  74.   /* position: absolute; */
  75.   top: 13rem;
  76.   left: -8rem;
  77.   width: 20rem;
  78.   height: 20rem;
  79.   /* background-color: #edbbff; */
  80.   background-image: radial-gradient(circle, rgba(237, 187, 255, 1) 0%, rgba(237, 187, 255, 0) 100%);
  81.   box-shadow: 0 20px 70px rgba(237, 187, 255, 0.2),
  82.       /* 下阴影 */
  83.       0 -20px 70px rgba(237, 187, 255, 0.2),
  84.       /* 上阴影 */
  85.       20px 0 70px rgba(237, 187, 255, 0.2),
  86.       /* 右阴影 */
  87.       -20px 0 70px rgba(237, 187, 255, 0.2);
  88.   /* 左阴影 */
  89.   z-index: -5;
  90. }
  91. .blue {
  92.   /* background-color: #aef1f5; */
  93.   top: -6rem;
  94.   left: 10rem;
  95.   background-image: radial-gradient(circle, rgba(174, 241, 245, 1) 0%, rgba(237, 187, 255, 0) 100%);
  96.   box-shadow: 0 20px 70px rgba(174, 241, 245, 0.2),
  97.       /* 下阴影 */
  98.       0 -20px 70px rgba(174, 241, 245, 0.2),
  99.       /* 上阴影 */
  100.       20px 0 70px rgba(174, 241, 245, 0.2),
  101.       /* 右阴影 */
  102.       -20px 0 70px rgba(174, 241, 245, 0.2);
  103.   /* 左阴影 */
  104.   z-index: -5;
  105. }
  106. .yellow {
  107.   top: -3rem;
  108.   left: 40rem;
  109.   /* background-color: #ffddb6; */
  110.   background-image: radial-gradient(circle, rgba(255, 221, 182, 1) 0%, rgba(237, 187, 255, 0) 100%);
  111.   box-shadow: 0 20px 70px rgba(255, 221, 182, 0.2),
  112.       /* 下阴影 */
  113.       0 -20px 70px rgba(255, 221, 182, 0.2),
  114.       /* 上阴影 */
  115.       20px 0 70px rgba(255, 221, 182, 0.2),
  116.       /* 右阴影 */
  117.       -20px 0 70px rgba(255, 221, 182, 0.2);
  118.   /* 左阴影 */
  119.   z-index: -5;
  120. }
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) Powered by Discuz! X3.4