๋ฐ์ํ
๋ณธ๋ฌธ ์๋์ ๋์ค๋ ๊ด๋ จ๊ธ ๋ฆฌ์คํธ๋ฅผ ์์ ๊ฐ์ด ๋ง๋๋ ๋ฐฉ๋ฒ์ ๋๋ค. ์ฝ๋ฉ ์ง์์ด ์์ด๋ ์ถฉ๋ถํ ๊ฐ๋ฅํฉ๋๋ค.
1. ํฐ์คํ ๋ฆฌ ๊ด๋ จ๊ธ ๋ฆฌ์คํธ HTML ์์
<div class="area_etc"> ๋ฐ๋ก ์์ค์ ์ฝ๋ ๋ถ์ฌ๋ฃ๊ธฐ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | <!--๊ด๋ จ๊ธ ์์--> <s_article_related> <div class="area_related"> <strong class="tit_related">'๐ป Information/Computer' Related articles</strong> <a href="/category/%F0%9F%92%BB%20Information/Computer" class="link_more">more</a> <ul class="list_related"> <s_article_related_rep> <li class=""> <a href="" class="link_related"> <div class="related_item"> <s_article_related_rep_thumbnail> <img src="//i1.daumcdn.net/thumb/C200x200/?fname=" class="img_related"> </s_article_related_rep_thumbnail> <a class="related_info" href=""> <span class="txt_related"></span> <span class="date_related"></span> <span class="related_category">๐ป Information/Computer</span> </a> </div> </a> </li> </s_article_related_rep> </ul> </div> </s_article_related> <!--๊ด๋ จ๊ธ ๋--> | cs |
2. ํฐ์คํ ๋ฆฌ ๊ด๋ จ๊ธ CSS ์์ 1
@media only screen and (max-width:820px) ๋ฐ๋ก ์์ค์ ์ฝ๋ ๋ถ์ฌ๋ฃ๊ธฐ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | /* ๊ด๋ จ๊ธ ์์ญ */ .tit_related { font-size: 16px; font-weight: normal; } .related_item { padding: 15px 0 20px; max-width: 820px; border-bottom: 1px solid #ebebeb; margin-right: 15px; } .img_related { float: right; height: 133px; width: 133px; border-radius: 4px; } .related_info { display: block; padding: 20px 0; } .related_info:hover { text-decoration: none; } .txt_related { display: block; font-size: 28px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .txt_related:hover { color: #3db39e; } .date_related { display: block; color: #666; } .related_category { display: block; color: #0F4B87; } .link_more { color: #3db39e; font-size: 14px; font-weight: bold; padding-left: 5px; } .link_more:hover { text-decoration: none; } | cs |
3. ํฐ์คํ ๋ฆฌ ๊ด๋ จ๊ธ CSS ์์ 2
@media only screen and (max-width:820px) and (-webkit-min-device-pixel-ratio: 1.5) ๋ฐ๋ก ์์ค์ ์ฝ๋ ๋ถ์ฌ๋ฃ๊ธฐ
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | /* ๊ด๋ จ๊ธ ์์ญ */ .tit_related { font-size: 14px; font-weight: bold; } .area_related { padding: 0 0 20px 15px; color: #333; font-family: applesdgothicneo-semibold; font-weight: bold; } .related_item { padding: 0; } .related_info { font-size: 14px; } .txt_related { padding-right: 30px; font-size: 18px; font-family: applesdgothicneo-semibold; font-weight: bold; } .img_related { margin-top: 15px; height: 82px; width: 82px; } .link_more { font-size: 13px; } | cs |
์ ์ฝ๋๋ฅผ ๋ชจ๋ ๋ด์ ํ ์คํธ ํ์ผ์ ๋๋ค.
๋ค์ด ๋ฐ์ ์ฌ์ฉํ์ธ์.
โป ์คํจ ๋ฐฑ์ ํ ์งํํ์๊ธฐ ๋ฐ๋๋๋ค.
๋ฐ์ํ