微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

左图有文字的一些CSS样式

<!DOCTYPE html>
<html lang="en">
<head>
  <Meta charset="UTF-8">
  <Meta name="viewport" content="width=device-width, initial-scale=1.0">
  <Meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>左图有文字的一些样式</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    .Box {
      padding: 0 15px;
      height: 70px;
      background: #ccc;
      display: flex;
      position: relative;
    }
    .Box .flx {
      position: absolute;
      right: 15px;
      height: 70px;
      line-height: 70px;
    }
    .Box .img {
      width: 50px;
      height: 50px;
      margin: 10px 10px 10px 0;
    }
    .Box .right {
      flex: 1;
      flex-direction: column;
      display: flex;
      justify-content: center;
    }
    .Box .p {
      height: 100%;
      line-height: 35px;
    }
    .Box .p2 {
      font-size: 14px;
    }

    /* end------------------------------------- */
    .Box2 {
      padding: 0 15px;
      height: 70px;
      background: #ccc;
      display: flex;
      margin-top: 20px;
    }
    .Box2 .img {
      width: 50px;
      height: 50px;
      margin: 10px 10px 10px 0;
    }
    .Box2 .right {
      flex: 1;
      flex-direction: column;
      display: flex;
      justify-content: center;
    }
    .Box2 .p {
      height: 100%;
      line-height: 35px;
    }
    .Box2 .p2 {
      font-size: 14px;
    }
    .Box2 .bottom {
      font-size: 13px;
    }
    .Box2 .bottom .time{
      float: right;
    }
    /* end------------------------------------- */
    .Box3 {
      padding: 0 15px;
      height: 70px;
      background: #ccc;
      display: flex;
      margin-top: 20px;
      font-size: 15px;
    }
    .Box3 .img {
      width: 50px;
      height: 50px;
      margin: 10px 10px 10px 0;
    }
    .Box3 .right {
      flex: 1;
      flex-direction: column;
      display: flex;
      justify-content: center;
    }
    .Box3 .p2 {
      font-size: 14px;
    }
    .Box3 .bottom {
      font-size: 13px;
      color: #333333;
    }
    .Box3 .bottom .time{
      float: right;
    }
    .Box3 .bottom .price{
      color: red;
    }
    /* end------------------------------------- */
    .Box4 {
      padding: 0 15px;
      height: 70px;
      background: #ccc;
      display: flex;
      margin-top: 20px;
      font-size: 15px;
    }
    .Box4 .img {
      width: 50px;
      height: 50px;
      margin: 10px 10px 10px 0;
    }
    .Box4 .right {
      flex: 1;
      flex-direction: column;
      display: flex;
      justify-content: center;
    }
    .Box4 .p2 {
      font-size: 14px;
    }
    .Box4 .bottom {
      font-size: 13px;
      color: #333333;
    }
    .Box4 .bottom .time{
      float: right;
    }
    .Box4 .bottom .price{
      color: red;
    }
  </style>
</head>
<body>
  <div class="Box">
    <div class="flx">></div>
    <img class="img" src="https://avatars1.githubusercontent.com/u/19720683?s=460&v=4" alt="tu" />
    <div class="right">
      <p class="p">古北-畅游记</p>
      <p class="p p2">这是第二段段文字标题</p>
    </div>
  </div>
  <div class="Box2">
    <img class="img" src="https://avatars1.githubusercontent.com/u/19720683?s=460&v=4" alt="tu" />
    <div class="right">
      <p class="p">古北-畅游记</p>
      <div class="p bottom">
        <span class="name">古北水镇</span>
        <span class="time">2019-02-23</span>
      </div>
    </div>
  </div>
  <div class="Box3">
    <img class="img" src="https://avatars1.githubusercontent.com/u/19720683?s=460&v=4" alt="tu" />
    <div class="right">
      <p class="p">古北-畅游记</p>
      <div class="p bottom">
        <span>名胜古迹</span>
        <span>4A景区</span>
        <span class="price">¥20</span>
      </div>
      <div class="p bottom">
        <span class="name">古北水镇</span>
        <span class="time">2019-02-23</span>
      </div>
    </div>
  </div>
  <div class="Box4">
    <img class="img" src="https://avatars1.githubusercontent.com/u/19720683?s=460&v=4" alt="tu" />
    <div class="right">
      <p class="p">古北-畅游记<span style="float: right">某些文字</span></p>
      <div class="p bottom">
        <span>名胜古迹</span>
        <span>4A景区</span>
        <span class="price">¥20</span>
      </div>
      <div class="p bottom">
        <span class="name">古北水镇</span>
        <span class="time">2019-02-23</span>
      </div>
    </div>
  </div>
</body>
</html>

/res/2022/10-08/03/f82c5ed2725c17c86a51fe8f5b1b7b4a.jpg

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐