よこ並び
レスポンシブ化に対応
よこ並び10
<section class="original-area"> <div class="inner"> <ul class="box"> <li> <div class="item"><a href=""> <div class="ttl">見出し</div> <div class="img"><img src="https://placehold.jp/500x500.png" alt=""></div> </a> </div> </li> <li> <div class="item"><a href=""> <div class="ttl">見出し</div> <div class="img"><img src="https://placehold.jp/500x500.png" alt=""></div> </a> </div> </li> <li> <div class="item"><a href=""> <div class="ttl">見出し</div> <div class="img"><img src="https://placehold.jp/500x500.png" alt=""></div> </a> </div> </li> </ul> </div> </section>
.original-area .box { display: flex; flex-wrap: wrap; justify-content: center; margin: 0 -40px; } .original-area .box li { width: calc(100% / 3); padding: 0 40px; } .original-area .item a { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: auto; border-radius: 50%; background: #fff; -webkit-box-shadow: 7px 7px 14px #d7eff9, -7px -7px 14px #d7eff9, inset 7px 7px 14px transparent, inset -7px -7px 14px transparent; box-shadow: 7px 7px 14px #d7eff9, -7px -7px 14px #d7eff9, inset 7px 7px 14px transparent, inset -7px -7px 14px transparent; -webkit-transition: 0.4s ease; transition: 0.4s ease; aspect-ratio: 1; } .original-area .item a:hover { box-shadow: 7px 7px 14px transparent, -7px -7px 14px transparent, inset 7px 7px 14px #d7eff9, inset -7px -7px 14px #d7eff9; } .original-area .item .ttl { margin-bottom: 10px; font-weight: bold; font-size: 20px; text-align: center; } .original-area .box .img { width: 100%; max-width: 100px; display: block; position: relative; } .original-area .box .img::after { content: ""; display: block; padding-top: 100%; } .original-area .box .img img { width: 100%; height: 100% !important; -o-object-fit: contain; object-fit: contain; -o-object-position: 50% 50%; object-position: 50% 50%; font-family: "object-fit: contain; object-position: 50% 50%;"; position: absolute; top: 0; left: 0; } @media (max-width: 599px) { .original-area .box { margin: 0px; } .original-area .box li { width: calc(100% / 1); padding: 0px; } .original-area .box li+li { margin-top: 30px; } }
丸枠の中に見出し、画像があり、リンクボタンなどに使用。