AMPページにて
CSSの指定にposition:fixed
及び、position:stickyを使用した際に、
オーガニック検索からAMPページをプレビュー(Google CDNのAMPキャッシュ時)すると対象箇所がスクロールによって
上下にうごいてしまう。
動かないように、CSSの指定をposition:absoluteを指定すると治るが、stickyおよびfixedで指定したい。
<!--HTML--> <section class="section"> <p class="AAAAAAAA"> <span> <a> <amp-img > <i-amphtml-sizer ></i-amphtml-sizer> <img> </amp-img> </a> </span> </p> </section> <!--CSS--> section.section { position:relative; transform: none; width:100%; } .AAAAAAAA { position: -webkit-sticky;/* Safari */ position: sticky; bottom: 0; text-align:center; background: rgba(255,255,255, 0.8); height: auto; border: 5px solid rgba(255,255,255,0.2); border-bottom: 10px solid rgba(255,255,255,0.2); }
あなたの回答
tips
プレビュー