ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

CSS练习记录:一个简单的responsive页面

2022-04-13 16:31:44  阅读:153  来源: 互联网

标签:guitar Jason img content width responsive margin CSS 页面


 

 

 

 

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Jason Becker | Not Dead Yet</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      body {
        margin: 5px;

        border-style: double;
        border-radius: 1.5%;
      }
      .container {
        width: 70vw;

        margin: 0 auto;
      }
      .hr-1 {
        border: 2px solid black;
      }
      ul.nav-ul {
        display: flex;
        justify-content: space-between;
        width: 80%;
        margin: 10px auto;
        padding: 10px 0px;
      }
      li {
        list-style: none;
      }
      a {
        text-decoration: none;
        color: inherit;
      }
      .img-list {
        margin: 15px 0;
        display: flex;
        justify-content: space-around;
      }
      .img-list img {
        width: 28%;
        object-fit: cover;
        object-position: right;
      }
      @keyframes zoominoutsinglefeatured {
        0% {
          transform: scale(1, 1);
        }
        50% {
          transform: scale(1.2, 1.2);
        }
        100% {
          transform: scale(1, 1);
        }
      }
      .logo img {
        display: block;
        margin: 0 auto;
      }
      #not-dead-logo {
        animation: zoominoutsinglefeatured 1.3s infinite;
      }
      @media screen and (max-width: 569px) {
        .logo img {
          width: 200px;
        }
        ul.nav-ul {
          font-size: 0.1rem;
        }
      }
      .content {
        text-align: center;
        font-family: "Courier New", Courier, monospace;
      }
      .content p {
        font-size: 1.5rem;
        margin: 5px 10px;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="logo">
        <img src="logo-1.png" alt="" />
        <img id="not-dead-logo" src="logo-2.png" alt="" />
      </div>
      <hr class="hr-1" />
      <div class="nav">
        <ul class="nav-ul">
          <li><a href="#">HOME</a></li>
          <li><a href="#">DISCOGRAPHY</a></li>
          <li><a href="#">MOVIE</a></li>
          <li><a href="#">CONTACT</a></li>
        </ul>
      </div>
      <hr class="hr-2" />
      <div class="img-list">
        <img src="1.jpg" alt="" />
        <img src="2.jpg" alt="" />
        <img src="3.jpg" alt="" />
      </div>

      <div class="content">
        <h1>About Jason</h1>
        <p>
          Jason Becker’s story is one of brilliance, talent, determination,
          adversity, and, ultimately, triumph. A child prodigy on guitar, Jason
          rose to prominence as a teenager when he was one half of the legendary
          rock guitar duo Cacophony (with his great friend Marty Friedman).
          After wowing audiences all over the world with his amazing guitar
          chops and deep compositions, Jason auditioned for—and got—the gig with
          David Lee Roth, following in the huge footsteps of Eddie Van Halen and
          Steve Vai. He wrote and recorded the DLR album A Little Ain’t Enough
          and was poised to take over the rock guitar world when a nagging pain
          in his leg was diagnosed as ALS, or Lou Gehrig’s Disease, a
          debilitating and fatal condition with a life expectancy of maybe five
          years. Maybe.
        </p>
      </div>
    </div>
  </body>
</html>

 

标签:guitar,Jason,img,content,width,responsive,margin,CSS,页面
来源: https://www.cnblogs.com/importsober/p/16140870.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有