美文网首页
Front-web 启示录

Front-web 启示录

作者: 不开口的巴旦木 | 来源:发表于2018-10-02 00:29 被阅读0次

Q: 如何实现下图效果?


QQ截图20181001203922.png

A: Html

<div class="adv-wrapper">       <div class="adv-wrapper-text">        &lt;广告&gt;      </div>    </div>

Css

.adv-wrapper{
  background: #444;
  width: 100%;
  right: 0;
  height: 40px;
}

.adv-wrapper{
  top: 0;
  position: fixed;
  z-index: 10001;
}

.adv-wrapper .adv-wrapper-text{
  color: #a8a8aa;
  font-size: 12px;
  font-family: "SF Pro SC", "HanHei SC", "SF Pro Text", "Myriad Set Pro",
               "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.adv-wrapper .adv-wrapper-text{
  line-height: 40px;
  text-align: right;
  max-width: 976px;
  margin: 0 auto;
  text-overflow: ellipsis;
}

@media only screen and (max-width: 1023px){
  .adv-wrapper .adv-wrapper-text{
    margin-left: auto;
    width: auto;
    padding: 0 22px;
    position: relative;
    left: 0;
  }
}

Q: 如何实现下图导航栏效果?


QQ截图20181001212242.png

A: html

  <nav id="ac-globalnav" role="navigation" aria-label="全部网站">
        <div class="ac-gn-content">
                <!-- Web导航-->
          <ul class="ac-gn-list">
            <li class="ac-gn-item ac-gn-apple">
              <a class="ac-gn-link ac-gn-link-apple" href="#">
                <span class="ac-gn-link-text">Apple</span>
              </a>
            </li><!--
         --><li class="ac-gn-item ac-gn-item-menu ac-gn-mac">
             <a class="ac-gn-link ac-gn-link-mac" href="#">
               <span class="ac-gn-link-text">Mac</span>
             </a>
           </li><!--
         --><li class="ac-gn-item ac-gn-item-menu ac-gn-ipad">
             <a class="ac-gn-link ac-gn-link-ipad" href="#">
               <span class="ac-gn-link-text">iPad</span>
             </a>
           </li><!--
         --><li class="ac-gn-item ac-gn-item-menu ac-gn-iphone">
             <a class="ac-gn-link ac-gn-link-iphone" href="#">
               <span class="ac-gn-link-text">iPhone</span>
             </a>
           </li><!--
         --><li class="ac-gn-item ac-gn-item-menu ac-gn-watch">
             <a class="ac-gn-link ac-gn-link-watch" href="#">
               <span class="ac-gn-link-text">Watch</span>
             </a>
           </li><!--
         --><li class="ac-gn-item ac-gn-item-menu ac-gn-music">
              <a class="ac-gn-link ac-gn-link-music" href="#">
                <span class="ac-gn-link-text">Music</span>
              </a>
            </li><!--
         --><li class="ac-gn-item ac-gn-item-menu ac-gn-support">
             <a class="ac-gn-link ac-gn-link-support" href="#">
               <span class="ac-gn-link-text">技术支持</span>
             </a>
           </li><!--
         --><li class="ac-gn-item ac-gn-item-menu ac-gn-search">
             <a class="ac-gn-link ac-gn-link-search" href="#">
                <span class="ac-gn-link-text">Search</span>
             </a>
           </li><!--
         --><li class="ac-gn-item ac-gn-bag">
             <a class="ac-gn-link ac-gn-link-bag" href="#">
               <span class="ac-gn-link-text">购物袋</span>
             </a>
           </li>
          </ul>
        </div>
      </nav>

Css

#ac-globalnav{
  position: fixed;
  font-family: "SF Pro SC","HanHei SC","SF Pro Text","Myriad Set Pro",
               "SF Pro Icons","PingFang SC","Helvetica Neue",
               "Helvetica","Arial",sans-serif;
  top: 40px;
  z-index: 9999;
}

#ac-globalnav{
  right: 0;
  left: 0;
  width: 100%;
  height: 48px;
  max-height: 44px;
  background: rgba(0,0,0,0.8);
  font-size: 17px;
  user-select: none;
}

#ac-globalnav, #ac-globalnav input{
  direction: ltr;
  text-align: left;
}

#ac-globalnav .ac-gn-content{
  margin: 0 auto;
  max-width: 980px;
  padding: 0 22px;
  position: relative;
  z-index: 2;
}

#ac-globalnav .ac-gn-list{
  margin: 0 -10px;
  width: auto;
  height: 44px;
  display: flex;
  justify-content: space-between;
  user-select: none;
}

#ac-globalnav .ac-gn-item{
  display: inline-block;
  position: relative;
  height: 44px;
  z-index: 1;
  vertical-align: top;
}

#ac-globalnav .ac-gn-link{
  font-family: "SF Pro SC","HanHei SC","SF Pro Text",
               "Myriad Set Pro","SF Pro Icons","PingFang SC","Helvetica Neue",
               "Helvetica","Arial",sans-serif;
  letter-spacing: 0em;
}

#ac-globalnav .ac-gn-link{
  font-size: 14px;
  line-height: 3.14286;
  font-weight: 400;
  color: #fff;
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 10px;
  height: 44px;
  opacity: 1;
  background-repeat: no-repeat;
  white-space: nowrap;
}

Q: 如何实现下图所示效果?


QQ截图20181002131401.png

A: Html

<main class="main  with-0 with-1 with-2 with-3" role="main">
        <section class="homepage-section collection-module hero-section">
          <div class="hero iphone-xs hero-iphone-xs" data-unit-id="iphone-xs">
            <div class="unit-wrapper theme-dark">
              <a href="#" class="unit-link">
                <span class="visuallyhidden unit-link-vo"></span>
              </a>
              <div class="unit-copy-wrapper">
                <h2 class="headline logo-image logo-image-iphone-xs-logo-hero">
                  <span class="visuallyhidden">iPhone&nbsp;X&nbsp;S</span>
                </h2>
                <h3 class="subhead centerall">大屏幕上见</h3>
                <div class="cta-link">
                  <a href="#" class="more" aria-label="进一步了解 iPhone X S">进一步了解</a>
                  <a href="#" class="more" aria-label="购买 iPhone X S">购买</a>
                </div>
              </div>
              <div class="unit-image-wrapper">
                  <figure class="unit-image unit-image-iphone-xs-iphone-xs"></figure>
              </div>
            </div>
          </div>
        </section>
</main>

CSS:

.main{
  position: relative;
  max-width: 2560px;
  margin: 0 auto;
}
.main .hero-section:first-child [data-unit-id]:nth-child(-n+1){
    padding-top: 84px;
}

.theme-dark{
  background-color: #000;
  color: #ccc;
}

.theme-dark a{
  color: #6bf;
}

.theme-dark h1, .theme-dark h2, .theme-dark h3, .theme-dark h4, .theme-dark h5, .theme-dark h6 {
    color: #fff;
}

.main .hero-section [data-unit-id] .unit-wrapper {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
}

.main .hero-section [data-unit-id] .unit-wrapper a.unit-link{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

.main .hero-section [data-unit-id] .unit-wrapper .unit-copy-wrapper{
  position: relative;
  flex-grow: 0;
  z-index: 4;
}

.main .hero-section [data-unit-id] .unit-copy-wrapper{
  text-align: center;
  padding-top: 47px;
}
.main .hero-section [data-unit-id] .unit-copy-wrapper>*.headline{
  font-size: 56px;
  line-height: 1.07143;
  font-weight: 600;
  letter-spacing: -.005em;
  font-family: "SF Pro Display","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
}

.main .hero-section [data-unit-id] .headline,
.main .hero-section [data-unit-id] .subhead,
.main .hero-section [data-unit-id] .cta{
  text-align: center;
  display: block;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  flex-shrink: 1;
}

.logo-image{
  margin: 0 auto;
}

.main .hero-section [data-unit-id] .unit-copy-wrapper>*.subhead{
  font-size: 27px;
  line-height: 1.14815;
  font-weight: 400;
  letter-spacing: .008em;
  font-family: "SF Pro Display","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
  margin-top: 6px;
}

.centerall {
  padding-left: 0.4em;
}

.main .hero-section [data-unit-id] .unit-copy-wrapper>*.cta-link{
  font-family: "SF Pro SC","SF Pro Display","SF Pro Icons","PingFang SC",
               "Helvetica Neue","Helvetica","Arial",sans-serif;
}

.main .hero-section [data-unit-id] .unit-copy-wrapper>*.cta-link{
  position: relative;
  z-index: 4;
  text-decoration: none;
}

.main .hero-section [data-unit-id] .unit-copy-wrapper>*.cta,
.main .hero-section [data-unit-id] .unit-copy-wrapper>*.cta-link {
  display: inline-block;
  font-size: 21px;
  line-height: 1.38105;
  font-weight: 400;
  letter-spacing: .011em;
  font-family: "SF Pro Display","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
  margin-top: 9px;
}

.main .hero-section [data-unit-id] .unit-wrapper .unit-copy-wrapper a {
    pointer-events: all;
    z-index: 4;
}

.main .hero-section [data-unit-id] .unit-copy-wrapper>*.cta-links a:last-child {
    margin-left: 26px;
}

.main .hero-section [data-unit-id] .unit-wrapper .unit-image-wrapper{
  z-index: 1;
  overflow: visible;
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
}

.main .hero-section [data-unit-id] .unit-image-wrapper{
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.main .hero-section [data-unit-id] .unit-image{
  z-index: 1;
  position: absolute;
  border: 0;
  left: calc(50% + 0px);
  right: auto;
  bottom: 0px;
  top: auto;
  -webkit-transform: translatex(-50%);
  transform: translatex(-50%);
}

.main .hero-section [data-unit-id] .unit-image.unit-image-iphone-xs-iphone-xs{
  width: 972px;
  height: 337px;
  background-size: 972px 337px;
  background-repeat: no-repeat;
  background-image: url(../images/globalnav/apple/iphonexs/iphone_xs_large.jpg);
}

适配web和mobile

@media screen and (max-height:1442px) and (max-width: 1068px) and (min-height:734px)
and (min-width: 768px){
  .main .hero-section:first-child [data-unit-id]:nth-child(-n+1){
      border-top-width: 0px;
      padding-bottom: 0px;
      border-bottom-width: 6px;
      height: calc(650px + 50px);
  }
}
@media screen and (max-height:1442px) and (max-width: 1068px) and (min-height:734px)
and (min-width: 768px){
  .main .hero-section [data-unit-id]:nth-child(1n){
      border-left-width: 0px;
  }
}

@media screen and (max-height:1442px) and (max-width: 1068px) and (min-height:734px)
and (min-width: 768px){
  .main .hero-section [data-unit-id]:nth-child(1n+1){
      border-right-width: 0px;
  }
}

@media screen and (max-height: 1442000px) and (max-width: 1068px) and (min-height: 734px)
and (min-width: 768px){
  .main .hero-section [data-unit-id]{
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    border-top-width: 6px;
    padding-bottom: 0px;
    border-bottom-width: 6px;
    padding-top: 0px;
    height: calc(650px + 12px);
  }
}


@media screen and (max-height: 1442000px) and (max-width: 1068px) and (min-height: 734px)
and (min-width: 768px){
  .main .hero-section [data-unit-id]{
    background-color: #fafafa;
    border-color: #fff;
    border-style: solid;
  }
}

@media screen and (max-height: 1442000px) and (max-width: 1068px) and (min-height: 734px)
and (min-width: 768px){
  .main .hero-section [data-unit-id],
  .main .hero-section .unit-wrapper{
    position: relative;
    overflow: hidden;
  }
}

@media screen and (max-height: 1442000px) and (max-width: 1068px) and (min-height: 734px)
and (min-width: 768px){
  .main .hero-section [data-unit-id]{
    width: 100%;
  }
}

@media screen and (max-height: 1442000px) and (max-width: 1068px) and (min-height: 734px)
and (min-width: 768px){
  .main .hero-section .unit-wrapper{
    height: 650px;
    width: 100%;
  }
}

@media screen and (max-height: 1442000px) and (max-width: 1068px) and (min-height: 734px)
and (min-width: 768px){
  .main .hero-section [data-unit-id] .unit-wrapper{
    display: flex;
    flex-direction: column;
  }
}

@media only screen and (max-width: 1068px) and (min-height: 734px) and (min-width: 736px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper{
    padding-top: 65px;
  }
}

@media only screen and (max-width: 1068px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper{
    padding-top: 57px;
  }
}

@media only screen and (max-width: 1068px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper>*.headline{
    font-family: "SF Pro SC","SF Pro Display","SF Pro Icons","PingFang SC",
                 "Helvetica Neue","Helvetica","Arial",sans-serif;
  }
}

@media only screen and (max-width: 1068px){
    .main .hero-section [data-unit-id] .unit-copy-wrapper>*.headline{
      letter-spacing: 0em;
    }
}

@media only screen and (max-width: 1068px){
    .main .hero-section [data-unit-id] .unit-copy-wrapper>*.headline{
      font-size: 44px;
      line-height: 1.09091;
      font-weight: 600;
    }
}

@media only screen and (max-width: 1068px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper>*.headline{
    margin-bottom: 13px;
  }
}

@media only screen and (max-width: 1068px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper>*.subhead{
    font-family: "SF Pro SC","SF Pro Display","SF Pro Icons","PingFang SC",
                 "Helvetica Neue","Helvetica","Arial",sans-serif;
  }
}

@media only screen and (max-width: 1068px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper>*.subhead{
    margin-top: 5px;
  }
}

@media only screen and (max-width: 1068px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper>*.subhead{
    font-size: 24px;
    line-height: 1.16667;
    font-weight: 400;
    letter-spacing: .009em;
  }
}

@media only screen and (max-width: 1068px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper>*.cta,
  .main .hero-section [data-unit-id] .unit-copy-wrapper>*.cta-link {
    margin-top: 6px;
  }
}

@media only screen and (max-width: 1068px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper>*.cta-link a:last-child {
    margin-left: 20px;
  }
}

/*
  ========================================
  web homepage figure media
  ========================================
*/
@media only screen and (-webkit-min-device-pixel-ratio: 1.5)
and (max-width: 1068px) and (min-height: 734px) and (min-width: 736px),
only screen and (max-width: 1068px) and (min-height: 734px) and (min-resolution: 1.5dppx) and (min-width: 736px),
only screen and (max-width: 1068px) and (min-height: 734px) and (min-resolution: 144dpi) and (min-width: 736px){
  .main .hero-section .unit-image-wrapper .unit-image.unit-image-iphone-xs-iphone-xs{
    background-image: url(../images/globalnav/apple/iphonexs/iphone_xs_mediumtall_2x.jpg);
  }
}

@media only screen and (max-width: 1068px) and (min-height: 734px) and (min-width: 736px){
  .main .hero-section .unit-image-wrapper .unit-image.unit-image-iphone-xs-iphone-xs {
    width: 682px;
    height: 375px;
    background-size: 682px 375px;
    background-repeat: no-repeat;
    background-image: url(../images/globalnav/apple/iphonexs/iphone_xs_mediumtall.jpg);
  }
}


@media only screen and (-webkit-min-device-pixel-ratio: 1.5) and (max-width: 1068px),
only screen and (max-width: 1068px) and (min-resolution: 1.5dppx),
only screen and (max-width: 1068px) and (min-resolution: 144dpi){
  .main .hero-section .unit-image-wrapper .unit-image.unit-image-iphone-xs-iphone-xs {
    background-image: url(../images/globalnav/apple/iphonexs/iphone_xs_medium_2x.jpg);
  }
}

@media only screen and (max-width: 1068px){
  .main .hero-section .unit-image-wrapper .unit-image.unit-image-iphone-xs-iphone-xs {
    width: 682px;
    height: 315px;
    background-size: 682px 315px;
    background-repeat: no-repeat;
    background-image: url(../images/globalnav/apple/iphonexs/iphone_xs_medium.jpg);
  }
}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
 only screen and (min-resolution: 1.5dppx), (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi){
   .main .hero-section .unit-image-wrapper .unit-image.unit-image-iphone-xs-iphone-xs {
     background-image: url(../images/globalnav/apple/iphonexs/iphone_xs_large_2x.jpg);
   }
 }

 @media only screen and (max-width: 1068px) and (min-height: 734px) and (min-width: 736px){
   .main .hero-section [data-unit-id="iphone-xs"] .unit-image {
       -webkit-transform: translate3d(-50%, 19px, 0);
       transform: translate3d(-50%, 19px, 0);
   }
 }


/*
  ========================================
  web homepage media
  ========================================
*/
@media screen and (max-height: 1440px) and (max-width: 1068px)
and (min-height: 734px) and (min-width: 768px){
  .main .hero-section{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
}

/*
  ========================================
  mobile homepage media
  ========================================
*/
@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
}

@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section:first-child [data-unit-id]{
    width: 100%;
  }
}

@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section:first-child [data-unit-id]:nth-child(-n+1) {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    border-top-width: 0px;
    padding-bottom: 0px;
    border-bottom-width: 6px;
    padding-top: 48px;
    height: calc(500px + 54px);
  }
}

@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section:first-child [data-unit-id]:nth-child(-n+1) {
    padding-top: 84px;
  }
}

@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section:first-child [data-unit-id]:nth-child(1n) {
      border-right-width: 0px;
  }
}

@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section:first-child [data-unit-id]:nth-child(1n+1) {
      border-left-width: 0px;
  }
}

@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section [data-unit-id] {
      background-color: #fafafa;
      border-color: #fff;
      border-style: solid;
  }
}


@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section [data-unit-id] .unit-wrapper{
    height: 500px;
    width: 100%;
  }
}

@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper{
    padding-top: 37px;
  }
}

@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper>*.headline{
    font-size: 32px;
    line-height: 1.125;
    font-weight: 600;
    letter-spacing: 0em;
    font-family: "SF Pro Display","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
    margin-bottom: 7px;
  }

}

@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper>*.subhead{
    font-size: 19px;
    line-height: 1.42115;
    font-weight: 400;
    letter-spacing: .012em;
    font-family: "SF Pro Display","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
    margin-top: 2px;
  }
}

@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section [data-unit-id] .unit-copy-wrapper>*.cta-link{
    font-size: 19px;
    line-height: 1.42115;
    font-weight: 400;
    letter-spacing: .012em;
    font-family: "SF Pro Display","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
  }
}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5) and (max-width: 735px),
only screen and (max-width: 735px) and (min-resolution: 1.5dppx),
only screen and (max-width: 735px) and (min-resolution: 144dpi){
  .main .hero-section .unit-image-wrapper .unit-image.unit-image-iphone-xs-iphone-xs {
    background-image: url(../images/globalnav/apple/iphonexs/iphone_xs_small_2x.jpg);
  }
}

@media screen and (max-width: 735px) and (min-width: 0px){
  .main .hero-section .unit-image-wrapper .unit-image.unit-image-iphone-xs-iphone-xs {
    width: 200px;
    height: 331px;
    background-size: 200px 331px;
    background-repeat: no-repeat;
    background-image: url((../images/globalnav/apple/iphonexs/iphone_xs_small.jpg);
  }
}

Q: 如何实现下图所示效果?


QQ截图20181002154441.png

A: html

<main>
  <section class="homepage-section collection-module hero-section">
<div class="hero apple-watch-series-4 hero-apple-watch-series-4" data-unit-id="apple-watch-series-4">
            <div class="unit-wrapper">
              <a href="#" class="unit-link">
                <span class="visuallyhidden unit-link-vo"></span>
              </a>
              <div class="unit-copy-wrapper">
                <h2 class="headline logo-image logo-image-apple-watch-series-4-logo-hero">
                  <span>Apple&nbsp;Watch&nbsp;Series&nbsp;4</span>
                </h2>
                <h3 class="subhead centerall">
                  焕然一新,
                  <br class="medium-only">
                  唤醒更好的你。
                </h3>
                <div class="cta-link">
                  <a href="#" class="more" aria-label="进一步了解 Apple Watch Series 4">进一步了解</a>
                  <a href="#" class="more" aria-label="购买 Apple Watch Series 4">购买</a>
                </div>
              </div>
              <div class="unit-image-wrapper">
                <figure class="unit-image unit-image-apple-watch-series-4-apple-watch-series-4">

                </figure>
              </div>
            </div>
          </div>
  </section>
</main>

CSS:

.main .hero-section [data-unit-id="apple-watch-series-4"] .unit-wrapper .unit-copy-wrapper {
    display: inline-block;
    position: absolute;
    width: 50%;
    top: 50%;
    right: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    padding-top: 0;
}

.main .hero-section [data-unit-id="apple-watch-series-4"] .unit-image-wrapper {
    position: absolute;
    left: 50%;
    width: 50%;
    margin-left: 0;
}

适配:

/*
   ========================================
   web applewatch media
   ========================================
 */
 @media only screen and (max-width: 1068px){
   .main .hero-section [data-unit-id="apple-watch-series-4"] .unit-copy-wrapper {
       padding-top: 0;
   }
 }

 @media only screen and (max-width: 1068px) and (min-height: 734px) and (min-width: 736px){
   .main .hero-section [data-unit-id="apple-watch-series-4"] .unit-image-wrapper .unit-image.unit-image-apple-watch-series-4-apple-watch-series-4 {
       width: 362px;
       height: 698px;
       background-size: 362px 698px;
       background-repeat: no-repeat;
       background-image: url(../images/globalnav/apple/applewatch/apple_watch_series_4_mediumtall_2x.jpg);
   }
 }


 /*
   ========================================
   mobile applewatch @media
   ========================================
 */
@media only screen and (max-width: 735px) {
  .main .hero-section [data-unit-id="apple-watch-series-4"] .unit-wrapper .unit-copy-wrapper {
    padding-top: 37px;
  }
}

@media only screen and (max-width: 735px){
  .main .hero-section [data-unit-id="apple-watch-series-4"] .unit-wrapper .unit-copy-wrapper {
      width: 100%;
      right: auto;
      top: auto;
      position: relative;
      -webkit-transform: none;
      transform: none;
  }
}

@media only screen and (max-width: 735px){
  .main .hero-section [data-unit-id="apple-watch-series-4"] .unit-wrapper .unit-copy-wrapper>*.subhead {
      font-family: "SF Pro SC","SF Pro Display","SF Pro Icons",
                   "PingFang SC","Helvetica Neue","Helvetica","Arial",sans-serif;
  }
}

@media only screen and (max-width: 735px){
  .main .hero-section [data-unit-id="apple-watch-series-4"] .unit-copy-wrapper .medium-only {
      display: none;
  }
}

@media only screen and (max-width: 735px){
  .main .hero-section [data-unit-id="apple-watch-series-4"] .unit-image-wrapper {
      margin-left: 0;
  }
}

@media only screen and (max-width: 1068px){
  .main .hero-section [data-unit-id="apple-watch-series-4"] .unit-image-wrapper {
      margin-left: -20px;
  }
}

@media only screen and (max-width: 735px){
  .main .hero-section [data-unit-id="apple-watch-series-4"] .unit-image-wrapper {
      width: 100%;
      left: auto;
  }
}

@media only screen and (max-width: 735px){
  .main [data-unit-id="apple-watch-series-4"] .unit-image-wrapper .unit-image.unit-image-apple-watch-series-4-apple-watch-series-4 {
      width: 422px;
      height: 309px;
      background-size: 422px 309px;
      background-repeat: no-repeat;
      background-image: url(../images/globalnav/apple/applewatch/apple_watch_series_4_small_2x.jpg);
  }
}

相关文章

网友评论

      本文标题:Front-web 启示录

      本文链接:https://www.haomeiwen.com/subject/skonoftx.html