๋ชฉ์ฐจ
~ + ์ธ์ ํ์ ์ ํ์๋ฅผ ์ด์ฉํ No javascript ํ ๊ธ ์์ธ๊ฒ์ ํ๋ฉด CSS๋ง์ผ๋ก ํผ๋ธ๋ฆฌ์ฑํ๊ธฐ
์์ธ๊ฒ์ ๋ฒํผ์ ๋๋ ์ ๋ ์์ธ ๊ฒ์์ฉ ์ต์ ๋ค์ด ๋ณด์ฌ์ง๊ณ , ์์ธ๋ฒํผ์ ๋ค์ ํ๋ฒ ๋๋ฌ์ ํ ๊ธํ๋ฉด ์์ธ๊ฒ์์ด ์ฌ๋ผ์ง๋ ๊ฒ์ ๊ตฌํํ๋ ค๋ฉด ๋ณดํต์ ์๋ฐ์คํฌ๋ฆฝํธ๋ฅผ ์ธ ์ ๋ฐ์ ์๋ค.
ํ๋ค๋ชปํด ๋ถํธ์คํธ๋ฉ์ ์ฌ์ฉํ๋ค๊ณ ํ๋๋ผ๋, ๊ฐ๋จํ ํ ๊ธ ํจ์๋ฅผ ์ ์ฉํด์ผ๋ง ํ๋ค.
ํ์ง๋ง ์คํ์ผ ์ฒดํฌ๋ฐ์ค๋ฅผ ์์ฉํ๋ฉด, ์คํฌ๋ฆฝํธ์ ๋์์์ด ์์ธ ๊ฒ์ ํ ๊ธ์ด ๊ฐ๋ฅํ๋ค.
์๋ฆฌ๋ checkbox์ ์ธ์ ์๋ ๋จผํธ์ ์์ธ๊ฒ์ ์์ญ์ด ๋์ด๊ฒ ํ๋ ๊ฒ์ด๋ค.
input[type="checkbox"]+ ์ ํ์๋ ์ธ์ ํ์ ์ ํ์๊ธฐ ๋๋ฌธ์, label_text์ ์๋ณดํ๊ณ ,
input[type="checkbox"]~ ํ์ ์ ํ์๋ฅผ ์ด์ฉํด์
.styledBtnToggle input[type="checkbox"]~.searchDetail {
display: none;
}
.styledBtnToggle input[type="checkbox"]:checked~.searchDetail {
display: flex;
padding: 25px 20px;
}
์ด์ ๊ฐ์ด ์์ญ์ ์จ๊ธฐ๊ณ ๋ํ๋ธ๋ค.
display:flex๋ฅผ ์ฌ์ฉํ ๊ฒ์ ํด๋น ์์ญ์ ์คํ์ผ์ ๋ฐ์ํ์ผ๋ก ํผ๋ธ์ ํ๊ธฐ ์ํด์ ์ฌ์ฉํ์ ๋ฟ์ด๋ค. block์ผ๋ก ์ฒ๋ฆฌํด๋ ๋ฌด๋ฐฉํ๋ค.
๋ฐ๋ชจ ํ๋ฉด์ http://bcode.shop/contents/contents/list.php ์์ ํ์ธํ๋ฉด ๋๋ค.
์ ์ฒด ์์ค๋ฅผ ๊ณต๊ฐํ ์๋ ์์ง๋ง, ํต์ฌ์ด ํฌํจ๋ ์์ค ์ผ๋ถ๋ฅผ ๊ณต๊ฐํด ๋ํ ๋, ์ผ์ค ์๊ฒ ๊ฐ๋ค ์ฐ์๊ธธ...
HTML
<div class="listHeader">
<div class="contentsLock center-block container-fluid">
<nav>
<ul class="float-left dateFilter">
<li><input class="btn btn-sm btn-default categoryBtn" type="button" value="๋งค์ฌ์
">
</li>
<li><input class="btn btn-sm btn-default active categoryBtn" type="button" value="์ค๋ฆฌ์ง๋">
</li>
<li><input class="btn btn-sm btn-default categoryBtn" type="button" value="๋ฐฉ์ก๋ถ">
</li>
<li><input class="btn btn-sm btn-default categoryBtn" type="button" value="All">
</li>
<li><select class="form-control selectpicker noborder customCarets" style="width:120px;"
name="ctrlSortValue">
<option>๋ฑ๋ก์ผ</option>
<option>๋ฐฉ์ก(๊ฒ์)์ผ</option>
</select>
</li>
<li><input class="btn btn-sm btn-default timeBtn" type="button" value="์ค๋"></li>
<li><input class="btn btn-sm btn-default timeBtn active" type="button" value="์ด๋ฒ์ฃผ"></li>
<li><input class="btn btn-sm btn-default timeBtn" type="button" value="์ด๋ฒ๋ฌ"></li>
<li><input class="btn btn-sm btn-default timeBtn" type="button" value="์ฌํด"></li>
<li class="datePicker2">
<div class="form-group date">
<div class="input-group date" id="datetimepicker1" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input"
data-target="#datetimepicker1" data-toggle="datetimepicker"
name="ctrlDatePickerValue" />
<div class="input-group-append" data-target="#datetimepicker1"
data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
-
<div class="form-group date">
<div class="input-group date" id="datetimepicker2" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input"
data-target="#datetimepicker2" data-toggle="datetimepicker"
name="ctrlDatePickerValue" />
<div class="input-group-append" data-target="#datetimepicker2"
data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</li>
</ul>
<ul class="float-right">
<li class="float-right"><input type="text" class="form-control listSearch"
name="listSearch" placeholder="Search"></li>
<li><input type="button" class="btnReload" value="์ด๊ธฐํ" id="onRefresh"></li>
<li><input type="button" value="๊ฒ์" class="btn btn-primary btn-listSearch"
id="onSearch">
</li>
<li class="ml10 btnSpacer">
<!-- ์์ธ๋ฒํผ ์์น -->
</li>
</ul>
</nav>
<label class="styledBtnToggle">
<input type="checkbox" name="styledBtnToggle"> <span class="label-text"></span>
<!--Search Detail Area -->
<div class="searchDetail contentsLock center-block container-fluid">
<div class="searchDetailLeft">
<div class="titleForm"><label for="keywordChn">์ฑ๋</label></div>
<div class="keyForm">
<select class="form-control selectpicker noborder" data-live-search="true"
title="์ฑ๋๋ช
" name="ctrlSortValue">
<option>TvN</option>
<option>xTVN</option>
<option>Olive</option>
<option>oTvn</option>
<option>JTBC</option>
</select>
</div>
</div>
<div class="searchDetailRight">
<div class="titleForm"><label for="keywordChn">ํ๋ก๊ทธ๋จ</label></div>
<div class="keyForm">
<select class="form-control selectpicker noborder" data-live-search="true"
title="ํ๋ก๊ทธ๋จ๋ช
" name="ctrlSortValue">
<option>๋ชจํ
๋ธ๋ฃจ๋</option>
<option>์
๋ง๊ฐ ๋์ ์ด๋ฆ๋ฐ์๋ฅผ...</option>
<option>600์ผ ์์กด์</option>
<option>์ ํ ์์ฒ</option>
<option>์์ค๋ ์ฐ์๊ธฐ</option>
<option>์๋ฏธ๋ค๋ฐค์ฐฌ</option>
<option>์์ํญ์ํ</option>
<option>๋จน๊ณ ์ฃฝ์๋
์๋ค</option>
</select>
</div>
</div>
<div class="searchDetailLeft">
<div class="titleForm">
<select class="form-control selectpicker noborder" title="์ถ์ฐ"
name="ctrlSortValue">
<option>์ถ์ฐ</option>
<option>์คํญ</option>
</select></div>
<div class="keyForm">
<select class="form-control selectpicker noborder" data-live-search="true"
title="์ถ์ฐ์๋ช
, ๋ฐฐ์ญ๋ช
, ๋ณธ๋ช
" name="ctrlSortValue">
<option>์ด์ง์</option>
<option>์์ด์ </option>
<option>์์ด์ฐ</option>
<option>์์ ์ </option>
<option>์์์ </option>
<option>์์ด์ </option>
<option>์ด์ด์ </option>
</select>
</div>
</div>
<div class="searchDetailRight flexColumn">
<div class="flexColumnItem">
<div class="titleForm">Publish ์ด๋ ฅ
</div>
<div class="keyForm">
<label class="styledRadio">
<input type="radio" name="radio1" id="radio1" checked> <span
class="label-text">All</span>
</label>
<label class="styledRadio">
<input type="radio" name="radio1"> <span class="label-text">์์</span>
</label>
<label class="styledRadio">
<input type="radio" name="radio1"> <span class="label-text">์์</span>
</label>
</div>
</div>
<div class="flexColumnItem">
<div class="titleForm">Live ์ด๋ ฅ</div>
<div class="keyForm">
<label class="styledRadio">
<input type="radio" name="radio2" id="radio1" checked> <span
class="label-text">All</span>
</label>
<label class="styledRadio">
<input type="radio" name="radio2"> <span class="label-text">์์</span>
</label>
<label class="styledRadio">
<input type="radio" name="radio2"> <span class="label-text">์์</span>
</label></div>
<div class="titleForm">AI ๊ฒฐ๊ณผ ์ ๋ณด</div>
<div class="keyForm">
<label class="styledRadio">
<input type="radio" name="radio3" id="radio1" checked> <span
class="label-text">All</span>
</label>
<label class="styledRadio">
<input type="radio" name="radio3"> <span class="label-text">์์</span>
</label>
<label class="styledRadio">
<input type="radio" name="radio3"> <span class="label-text">์์</span>
</label>
</div>
</div>
</div>
</div>
<!-- Search Detail Area -->
</label>
</div>
</div>
CSS
/*styledBtnToggle +detailSearch No script Toggle*/
.btnSpacer {
width: 70px;
}
label.styledBtnToggle {
margin-bottom: 0;
}
.styledBtnToggle input[type="checkbox"]~.searchDetail {
display: none;
}
.styledBtnToggle input[type="checkbox"]:checked~.searchDetail {
display: flex;
padding: 25px 20px;
}
.styledBtnToggle input[type="checkbox"]+.label-text {
position: absolute;
top: 20px;
right: 20px;
}
.styledBtnToggle input[type="checkbox"] {
position: absolute;
top: 0;
right: 0;
margin: 0
}
.styledBtnToggle input[type="checkbox"]+.label-text:before {
content: "์์ธ";
height: 30px;
line-height: 30px;
text-align: center;
border-radius: 4px;
width: 70px;
background: #fff;
color: #4d79f6;
border: 1px solid #4d79f6;
display: inline-block;
margin-left: -3px;
vertical-align: baseline;
}
.styledBtnToggle input[type="checkbox"]:checked+.label-text:before {
content: "์์ธ";
color: #fff;
background: #4d79f6;
animation: effect 250ms ease-in;
}
noscript
๋๊ธ