.sc-visual .visual-slide .slogan{
padding: 20px;
overflow: hidden;
font-size: 100px;
font-weight: 800;
line-height: 1.2;
letter-spacing: -2.4px;
white-space: nowrap;
color: #fff;
box-sizing: border-box;
text-shadow: 6px 6px 18px rgb(0 0 0 / 16%);
animation: fade-out 0.2s linear forwards;
}
.sc-visual .visual-slide .swiper-slide-active .slogan{
opacity: 0;
animation: wave-in 0.3s ease-out forwards, fade-in 0.8s linear forwards;
animation-delay: 0.8s;
}
/* ํคํ๋ ์ */
@keyframes fade-out {
0% { opacity: 1; }
100% { opacity: 0; }
}
@keyframes fade-in {
0% { opacity: 0; }
100% { opacity: 1; }
}
@keyframes wave-in {
0% { width: 0%; }
100% { width: 100%; }
}
0%, 100% ์์ ์ width๊ฐ์ผ๋ก ์ผ์ชฝ์์ ์ค๋ฅธ์ชฝ์ผ๋ก ๋ํ๋๋ ํ
์คํธ ์ ๋๋ฉ์ด์
์ ๊ตฌํํ๋ค.
opacity์ ease-out,linear๋ฅผ ์ฃผ์ด ์ ๋๋ฉ์ด์
์ด ์์ฐ์ค๋ฝ๊ณ ๋ถ๋๋ฝ๊ฒ ๋ณด์ฌ์ง๊ณ
forwards๋ก ์ ๋๋ฉ์ด์
์ด ๋๋๊ณ ์ ์ง๋๋๋ก ํ์๋ค.
const visualSlide = new Swiper(".visual-slide", {
loop: true,
speed: 1500,
centeredSlides: true,
simulateTouch: false, //๋ง์ฐ์ค ๋๋๊ทธ ๋ง๊ธฐ
autoplay: {
delay: 6000,
},
});
์๋์ผ๋ก ์ฌ๋ผ์ด๋ ๋์ง ์๋๋ก simulateTouch: false
๋ก ๋ง์ฐ์ค ๋๋๊ทธ๋ฅผ ๋ง์์ฃผ์๋ค.
speed
๊ฐ์ ์กฐ์ ํ์ฌ ๋ค์ ์ฌ๋ผ์ด๋๋ก ๋์ด๊ฐ ๋ ๋ถ๋๋ฝ๊ฒ ๋ณด์ฌ์ง๋๋ก ํ๋ค.
<form method="get" class="group-search">
<div class="input-area">
<div class="keyword-ic">
<i class="ic"></i>
</div>
<span class="title">ํค์๋</span>
<input type="text" placeholder="ํ๋ก ํธ์๋ ๊ฐ๋ฐ์">
</div>
<div class="select-area">
<span class="title">๋ฒ์ธ</span>
<div class="select-box">
<select name="corp" id="">
<option value disabled selected>๋ฒ์ธ์ ํ</option>
<option value="">NAVER</option>
<option value="">NAVER Cloud</option>
</select>
</div>
</div>
<button type="submit" class="btn-search">๊ฒ์</button>
</form>
<option value disabled selected>๋ฒ์ธ์ ํ</option>
'disabled selected' ๋ฌธ๊ตฌ๋ฅผ option๋ ์์ ์์ฑํ๋ฉด placeholder์ฒ๋ผ ํ ์คํธ๊ฐ ๊ธฐ๋ณธ์ผ๋ก ๋ณด์ฌ์ง๋ค.
select option[value=""][disabled]{ display: none; }
CSS๋ก disabled์ธ select option์ display: none; ์ฒ๋ฆฌํ๋ฉด ์ ํ ๋ฆฌ์คํธ์ ๋ณด์ฌ์ง์ง ์๋๋ค.
.popup-search .search-area input::placeholder{
font-weight: bold;
color: #d0d0d0;
}
$('select').change(function(){
$(this).css('color','#000');
});
์๋ฌด๊ฒ๋ ์ ํํ์ง ์์ ์ฒ์ ํ
์ค๋ ํ์์ด ๋ง์ผ๋ ์ ํํ์ ๋๋ ๊ฒ์ ์์ด์ด์ผ ํ๋ ๊ฒฝ์ฐ!
select๋ click
์ด๋ฒคํธ๊ฐ ์๋๋ผ, ๊ฐ์ ์ ํํ์ ๋ ์ด๋ฒคํธ๋ก change
๋ผ๋ ์ด๋ฒคํธ๋ฅผ ์ฌ์ฉํ๋ค.
๋ค์ํ ํ๋ฉด ํด์๋์ ๋ฐ๋ผ HTML์ ์ ์ฉํ๋ ์คํ์ผ์ ์ ํํ ์ ์๋ CSS3์ ์์ฑ์ผ๋ก ์ ์ฐํ๊ฒ ์ปจํ ์ธ ๋ฅผ ๋ฐฐ์นํ ์ ์๋ค.
๊ธฐ๋ณธ ๋ฌธ๋ฒ
@media (screen) {
content;
}
์์ฑ ์์นโ
1. ๊ฐ css ํ์ผ ํ๋จ
2. response.css ํ์ผ์ ์์ฑ
3. ์์ค ๋ฐ๋ก ๋ฐ์ ์์ฑ (scss)
์์ฑ ๋ฐฉ๋ฒโ๏ธ
//๋๋ต ๊ตฌํ์ด ์๋ ๊ฒ ๊ฐ์ ๋์ด์์ ์์
. ๋ณดํต 1200 ์ด์
/* 1025 ~ 1200px๊น์ง ๋ณด์ด๋ ํ๋ฉด. ์ต์์น์ธ 1025๋ฅผ ๋ณด๊ณ ์์
*/
@media (max-width:1200px) { }
//์๋ 2๊ฐ์ง ์ฌ์ด์ฆ๋ ๋๋ถ๋ถ ์ ํด์ ธ์๋ค.
/* 768 ~ 1024px๊น์ง ๋ณด์ด๋ ํ๋ฉด. ์ต์์น์ธ 768์ ๋ณด๊ณ ์์
*/
@media (max-width:1024) { }
/* 320 ~ 767px๊น์ง ๋ณด์ด๋ ํ๋ฉด. ์ต์์น์ธ 320์ ๋ณด๊ณ ์์
*/
@media (max-width:767px) { }
๊ผญ ์ด ์์น๋ก ํด์ผํด! ๋ผ๋ ์ ๋ต์ ์๋ค. ๊ฐ์ฅ ๋ง์ด ์ฐ์ด๋ ๋ถ๊ธฐ์ ์ ์๋์ ๊ฐ๋ค.
@media (max-width:1200px) {
.wrapper{ padding-top: 60px; }
.sc-visual .visual-slide .slogan{ font-size: 80px; }
...(์๋ต)
}
@media (max-width:1024px) {
.inner1 { padding: 0 22px; }
.sc-visual .visual-slide .slogan{ font-size: 60px; }
...(์๋ต)
}
@media (max-width:767px) {
.inner1{ padding: 0 22px; }
.swiper-backface-hidden .swiper-slide{ padding-bottom: 62.5%; }
...(์๋ต)
}
๋ณธ ํ๋ก์ ํธ๋ max-width ๋ชจ๋ฐ์ผ 767px / ํ๋ธ๋ฆฟ 1024px / ๋
ธํธ๋ถ 1200px ๋ก ์์
ํ์๋ค.
โ๏ธ radio๋ ์ฌ๋ฌ ์ ํ์ง ์ค 1๊ฐ๋ง ์ ํ ๊ฐ๋ฅ, checkbox๋ ๋ค์ค ์ ํ ๊ฐ๋ฅ
<span class="headline">์ง๊ตฐ/์ง๋ฌด</span>
<div class="chk-inner">
<span class="title main">Tech</span>
<div class="chk-wrap">
<!-- ์ ์ฒด์ ํ -->
<div class="chk-box">
<input type="checkbox" id="all-1">
<label for="all-1" class="all-chk">์ ์ฒด</label>
</div>
<!-- ์๋ธ์นดํ
๊ณ ๋ฆฌ -->
<div class="sub-box">
<span class="title sub">Software Development</span>
<ul class="sub-list">
<li class="sub-item">
<input type="checkbox" id="frontend">
<label for="frontend">Frontend</label>
</li>
<li class="sub-item">
<input type="checkbox" id="android">
<label for="android">Android</label>
</li>
(...์๋ต)
</ul>
</div>
(...์๋ต)
</div>
</div>
id๋ก label๊ณผ input ์ฐ๊ฒฐ = input id์ label for ๊ฐ์ ๊ฐ๊ฒ (all-1)
<input type="checkbox" id="all-1">
<label for="all-1" class="all-chk">์ ์ฒด</label>
input์ appearance: none; ์ด ํด์ ๋์ด์ผ ๋์ผ๋ก ๋ณด์ฌ์ง๋ค.
ํด๋น ๊ธฐ๋ฅ์ ์ฒดํฌ๋ฐ์ค ์์ญ์ ๋์์ธ ์์ ์ด ๋ถ๊ฐํ์ฌ ์จ๊น ์ฒ๋ฆฌ ํ ๊พธ๋ฐ ์์์ธ ์ฒดํฌ๋ฐ์ค๋ฅผ ๋ง๋ค์ด์ผ ํ๋ค.
โ๏ธ ๋จ์ ์จ๊น ์ฒ๋ฆฌ๋ง ํ๋ ๊ฒ์ด ์๋, ์จ๊ฒจ์ก์ง๋ง ํด๋ฆญ์ด ๋์ด ๋ฐ์ดํฐ ์ ์ก์ด ๊ฐ๋ฅํ๊ฒ๋ ํด์ผํ๋ค.
1) ์จ๊น ์ฒ๋ฆฌ
.chk-area input{
position: absolute;
right: 0;
}
2-1) ๊พธ๋ฐ ์์์ ์ฒดํฌ๋ฐ์ค ์์ฑ
input์ ์ธ์ ์์์ ๋ผ๋ฒจ์ before ๊ธฐ๋ณธ ์คํ์ผ๋ง
.chk-area label::before{
content: '';
display: inline-block;
width: 8px; height: 8px;
border: 1px solid #d0d0d0;
border-radius: 50%;
margin-right: 10px;
}
2-2) ์ ํ ์ ์คํ์ผ๋ง (์ฒดํฌ ๋์์ ๋)
.chk-area input:checked+label::before{
background: #000;
border: 1px solid #fff;
}
1) ์ ์ฒด์ ํ
click ์ด๋ฒคํธ๋ก
1. ๋ชจ๋ input์ด ์ฒดํฌ ๋์ด์์ผ๋ฉด ํด์ ์ํค๊ณ
2. ๊ทธ๋ ์ง ์๋ค๋ฉด ๋ชจ๋ input์ ์ฒดํฌ ํ์ฑํ์ํจ๋ค.
$('.all-chk').click(function(){
if($(this).siblings('input').prop('checked')){
$(this).parent().siblings('.sub-box').find('input').prop('checked',false)
}else{
$(this).parent().siblings('.sub-box').find('input').prop('checked',true)
}
});
2) ์ ํ ์ด๊ธฐํ
์ด๊ธฐํ ๋ฒํผ์ ๋ง๋ค๊ณ click ์ด๋ฒคํธ๋ก ๋ชจ๋ input์ ์ฒดํฌ๋ฅผ ํด์ ์ํจ๋ค.
<button type="button" class="clear">Clear filters</button>
$('.clear').click(function(){
$('.popup-search input').prop('checked',false)
});