21.08.18
Today I Learned
Audio Page
audio.html
<!-- Audio Main Right -->
<div class="audio-main-right">
<!-- Audio Intro -->
<div id="audio-intro" class="audio-section">
<div class="audio-header">
<h2>인기 채널을 소개합니다.</h2>
</div>
<div class="audio-body">
<ul class="audio-flex-between">
<li>
<a href="#">
<img src="https://via.placeholder.com/152" alt="audio image" />
<h3>공유의 배드타임 스토리</h3>
<span class="source">네이버</span>
</a>
</li>
<li>
<a href="#">
<img src="https://via.placeholder.com/152" alt="audio image" />
<h3>밀레니얼의 시사친구, 듣똑라</h3>
<span class="source">중앙그룹</span>
</a>
</li>
</ul>
</div>
</div>
<!-- Audio Discovery -->
<div id="audio-discovery" class="audio-section">
<div class="audio-header">
<h2>
오늘의 발견<br />
요즘 많이 듣는 채널👍
</h2>
<p>6월 9일 0시부터 24시까지 많이 들은 채널입니다.</p>
<a href="#" class="link-setting">관심 설정</a>
</div>
<div class="audio-body">
<ul class="audio-flex-between">
<li>
<a href="#">
<img src="https://via.placeholder.com/152" alt="audio image" />
<h3>클래식매니저</h3>
</a>
</li>
<li>
<a href="#">
<img src="https://via.placeholder.com/152" alt="audio image" />
<h3>클래식매니저</h3>
</a>
</li>
<li>
<a href="#">
<img src="https://via.placeholder.com/152" alt="audio image" />
<h3>클래식매니저</h3>
</a>
</li>
<li>
<a href="#">
<img src="https://via.placeholder.com/152" alt="audio image" />
<h3>클래식매니저</h3>
</a>
</li>
</ul>
<button class="btn-more"><span class="color-blue">더 많이</span> 발견하기 1 <span class="pages">/ 5</span></button>
</div>
</div>
<!-- Audio Create -->
<div id="audio-create" class="audio-section">
<div class="audio-body">
<ul>
<li>
<a href="#" class="audio-flex-between">
<div class="txt-wrap">
<h2>오디오클립 채널을 만들어 보세요!</h2>
<p class="color-blue">콘텐츠 제안하기</p>
</div>
<div class="list-bg list-bg-1"></div>
</a>
</li>
<li>
<a href="#" class="audio-flex-between">
<div class="txt-wrap">
<h2>오디오클립 채널을 만들어 보세요!</h2>
<p class="color-purple">콘텐츠 제안하기</p>
</div>
<div class="list-bg list-bg-2"></div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</main>
<!-- Audio Footer -->
<footer id="audio-footer">
<div class="audio-container">
<h1>
<a href="#">audio clip</a>
</h1>
<div class="copyright-wrap">
<p>
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;<br />
Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula.<br />
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</p>
</div>
<nav class="footer-nav">
<ul>
<li><a href="#">로그인</a></li>
<li><a href="#">오디오클립 소개</a></li>
<li><a href="#">공식 포스트</a></li>
<li><a href="#">콘텐츠 제안</a></li>
<li><a href="#">이용약관</a></li>
<li><a href="#">개인정보처리방침</a></li>
<li><a href="#">책임의 한계와 법적고지</a></li>
<li><a href="#">결제관련문의</a></li>
<li><a href="#">고객센터</a></li>
</ul>
</nav>
<a href="#" class="footer-copyright-link">
<span class="symbol">©</span>
네이버
</a>
</div>
</footer>
style.css
/* Audio Main Right */
#audio-main .audio-main-right {
/* float: right; */
width: 330px;
}
/* Audio Intro */
#audio-intro {
}
#audio-intro .audio-body li {
}
#audio-intro .audio-body li a {
}
#audio-intro .audio-body li img {
width: 152px;
height: 152px;
border-radius: 4px;
}
#audio-intro .audio-body li h3 {
margin-top: 12px;
font-size: 13px;
}
#audio-intro .audio-body li .source {
margin-top: 4px;
font-size: 12px;
color: #959595;
}
/* Audio Discovery */
#audio-discovery {
}
#audio-discovery .audio-header {
position: relative;
}
#audio-discovery .audio-header h2 {
font-size: 17px;
line-height: 24px;
}
#audio-discovery .audio-header p {
margin-top: 7px;
font-size: 13px;
color: #888;
}
#audio-discovery .audio-header .link-setting {
display: block;
position: absolute;
right: 0;
top: 6px;
padding: 10px 18px 8px;
background-color: #fff;
font-size: 13px;
border: solid 1px rgba(0, 0, 0, 0.1);
border-radius: 20px;
box-shadow: 0 2px 10px 0 rgb(80, 85, 91 / 7%);
color: #157efb;
}
#audio-discovery .audio-body li {
margin-bottom: 40px;
}
#audio-discovery .audio-body li a {
}
#audio-discovery .audio-body li img {
width: 152px;
height: 152px;
border-radius: 4px;
}
#audio-discovery .audio-body li h3 {
margin-top: 12px;
font-size: 13px;
}
#audio-discovery .audio-body li .source {
margin-top: 4px;
font-size: 12px;
color: #959595;
}
#audio-discovery .audio-body .btn-more {
display: block;
margin: 0 auto; /* x축 중앙 정렬 */
font-size: 14px;
font-weight: 500;
color: #222;
padding: 12px 21px 12px 24px;
border: solid 1px rgba(0, 0, 0, 0.1);
border-radius: 24px;
background-color: #fff;
box-shadow: 0 2px 10px 0 rgb(80, 85, 91 / 7%);
}
#audio-discovery .audio-body .btn-more .color-blue {
color: #157efb;
}
#audio-discovery .audio-body .btn-more .pages {
color: #959595;
}
/* Audio Create */
#audio-create {
}
#audio-create .audio-body {
}
#audio-create .audio-body li {
padding: 22px 4px;
border-top: solid 1px #efefef;
}
#audio-create .audio-body li:last-child {
border-bottom: solid 1px #efefef;
}
#audio-create .audio-body li a {
}
#audio-create .audio-body li .txt-wrap {
width: 225px;
}
#audio-create .audio-body li .txt-wrap h2 {
font-size: 16px;
font-weight: 700;
}
#audio-create .audio-body li .txt-wrap p {
margin-top: 6px;
font-size: 14px;
letter-spacing: -0.8px;
}
#audio-create .audio-body li .txt-wrap p.color-blue {
color: #2db8e8;
}
#audio-create .audio-body li .txt-wrap p.color-purple {
color: #8560f7;
}
#audio-create .audio-body li .list-bg {
width: 80px;
height: 64px;
}
#audio-create .audio-body li .list-bg-1 {
background-color: yellow;
}
#audio-create .audio-body li .list-bg-2 {
background-color: purple;
}
/* Audio Footer */
#audio-footer {
background-color: #eaecef;
padding: 48px 0 164px;
}
#audio-footer h1 {
font-size: 25px;
}
#audio-footer h1 a {
color: #959595;
}
#audio-footer .copyright-wrap {
margin-top: 37px;
}
#audio-footer .copyright-wrap p {
letter-spacing: -0.5px;
font-size: 13px;
line-height: 19px;
color: #959595;
}
#audio-footer .footer-nav {
margin-top: 47px;
}
#audio-footer .footer-nav ul {
overflow: hidden;
}
#audio-footer .footer-nav li {
float: left;
}
#audio-footer .footer-nav li a {
font-size: 13px;
color: #959595;
}
#audio-footer .footer-nav li a::after {
display: inline-block;
content: '';
width: 2px;
height: 2px;
border-radius: 50%;
background-color: #959595;
/* margin: 4px 7px; */
vertical-align: top;
margin: 9px 7px 0;
}
#audio-footer .footer-nav li:last-child a::after {
content: none;
}
#audio-footer .footer-copyright-link {
display: block;
margin-top: 8px;
font-size: 12px;
color: #959595;
}
Audio Category Page
audio-category.html
<!-- Audio Main -->
<main id="audio-main" class="audio-sub-main" role="main">
<div class="audio-container">
<!-- Audio category Channel -->
<div id="audio-category-channel" class="audio-category">
<div class="title-wrap">
<h2>채널</h2>
<p>4,752개의 채널</p>
</div>
<ul class="audio-category-lists audio-flex-start">
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#<">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
</ul>
</div>
<!-- Audio Category Book -->
<div id="audio-category-book" class="audio-category">
<div class="title-wrap">
<h2>오디오북</h2>
<p>4,752개의 채널</p>
</div>
<ul class="audio-category-lists audio-flex-start">
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
<li class="category-list">
<a href="#">
<h3>예능</h3>
<p>유머, 코미디, 고민상담</p>
<img class="thumbnail" src="https://via.placeholder.com/78" alt="audio image" />
</a>
</li>
</ul>
</div>
</div>
</main>
style.css
/* Audio Catery Page */
#audio-main.audio-sub-main {
background-color: #fff;
}
.audio-category {
padding-top: 71px;
}
.audio-category .title-wrap {
padding-bottom: 20px;
border-bottom: solid 1px #ececec;
}
.audio-category .title-wrap h2 {
font-size: 27px;
font-weight: 600;
letter-spacing: -1px;
}
.audio-category .title-wrap p {
font-size: 14px;
color: #959595;
margin-top: 20px;
}
.audio-category .audio-category-lists {
margin-top: 22px;
}
.audio-category .audio-category-lists .category-list {
width: 162px;
height: 164px;
margin-right: 20px;
margin-bottom: 20px;
}
/*
odd - 홀수마다
even - 짝수마다
*/
.audio-category .audio-category-lists .category-list:nth-child(6n) {
margin-right: 0;
}
.audio-category .audio-category-lists a {
display: block;
overflow: hidden;
position: relative;
width: 100%;
height: 100%;
background-color: rgb(230, 125, 127);
border-radius: 6px;
padding: 14px;
}
.audio-category .audio-category-lists .category-list:nth-child(odd) a {
/* background-color: yellow; */
}
.audio-category .audio-category-lists .category-list:nth-child(even) a {
/* background-color: pink; */
}
.audio-category .audio-category-lists a h3 {
font-size: 19px;
line-height: 1.3;
color: #fff;
}
.audio-category .audio-category-lists a p {
position: absolute;
bottom: 14px;
width: 80px;
font-size: 13px;
color: #fefefe;
}
.audio-category .audio-category-lists a .thumbnail {
position: absolute;
right: -13px;
bottom: 0;
width: 78px;
height: 78px;
transform: rotate(25deg);
}
Review
最後に,オーディオクリップページのメインオーディオ部分と下部部分についてもcapicatを行った.さらに、オーディオ分類ページでもカピネコを作りました.
flexのspace-tweenプロパティには、要素が満たされていない場合、各要素の間に不要な空白が残るという問題があります.したがって、flex-startを適用すると、要素間にmarging-rightプロパティとmarging-bottomプロパティが付与されて配置されます.
nth-childのさまざまなプロパティでは、必要な要素だけがスタイルを指定できます.いくつかのnth-childプロパティを再利用してコードを簡潔に記述する必要があります.
Reference
この問題について(21.08.18), 我々は、より多くの情報をここで見つけました https://velog.io/@pyeonne/21.08.18テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol