input 검색창 입력후 되돌아오기
293
20 câu hỏi đã được viết
#header{
width:100%;
position:absolute;
left:0;
top:0;
z-index: 999;
background:white;
border-bottom: 1px solid rgba(0,0,0,0.1);
}
#header .inner{
width: 975px;
height: 77px;
margin:0 auto;
display: flex;
justify-content: space-between;
align-items: center;
}
#header .inner .logo a{
color:transparent;
}
#header .inner .logo .sprite_insta_icon{
position:relative;
margin-right:30px;
}
#header .inner .logo .sprite_insta_icon:after{
content:'';
width:1px;
height:28px;
background: #000;
position:absolute;
right:-15px;
top:0;
}
#header .inner .Logo > img{
width: 100px;
height:100px;
}
#header .inner .logo div{
vertical-align: middle;
}
#header .inner .logo a > div:nth-child(2){
transform:translateY(5px);
}
#header .search_box{
position:relative;
}
#search-field{
width:270px;
height:25px;
background:#fafafa;
border:1px solid #dbdbdb;
border-radius: 3px;
padding:3px 30px;
color:#999;
font-weight:400;
text-align: left;
font-size:14px;
outline:none;
}
#search-field::placeholder{
font-size:0;
}
#search-field:focus::placeholder{
font-size:14px;
}
#header .search_box .fakefield{
position:absolute;
left:50%;
top:50%;
transform: translate(-50%,-50%);
pointer-events: none;
}
#search-field:focus~ .fakefield > span:nth-child(1){
transform: translateX(-120px);
}
#search-field:focus~ .fakefield > span:nth-child(2){
display:none;
}
Câu trả lời 2
1
제 css 소스 코드도 첨부하는데 제가 만든 검색 창은 글씨를 입력하고 바깥에 마우스 커서를 누르게 되면
저런식으로 되네요 인스타에서는 저 가운데 값(ㅂㅈㄷ)이
되돌아오면서 검색이 사라지는데 말이죠...ㅠㅠ
0
안녕하세요 kindtiger입니다~
인풋안에 글자가 들어간 후 포커스 해제시 텍스트가 사라지는 인터렉션은 저희 수업엔 들어있지 않습니다 ㅠㅠ..
나중에 추가 영상으로 넣어볼게요~ ㅎㅎㅎ
간단하게 포커스 해제시 안에있는 글자를 지우는 방법은
const searchBox = document.querySelector('#search-field');
window.addEventListener('click',function(){
searchBox.value = "";
});
이런식으로 작성하시면 될것같아요 ^^
variableWidth.style.width 실행이 안되는것 같습니다.
0
304
0
알수없는 에러,,
0
210
0
postgresql: unrecognized service
0
290
0
AssertionError
0
214
0
\d 해도 작동이 안되고 에러가 납니다.
0
317
3
혹시 안내사항이 무슨 말인가요??
0
250
1
팔로잉 부분이 아예 작동이 안되네요. 분명히 똑같이 적은거 같은데 글자도 그림 뒤에 숨고 잘 작동이 안되요
0
283
3
전체 완성된 코딩소스는 어디잇나요?
0
190
2
4:10 쯤에 보이는 네모칸(빨, 주, 노, 초, ...) 치는 앱은 무엇인가요?
0
268
2
웹을 조금 해본사람이 들어야하나요 ?
1
212
1
제가 models.py의 Comment에서 post 변수를 안쓰고
0
230
0
여기까지 따라하고 runserver를 했더니 오류가 떠요
0
422
2
너무 저급한 질문 일 수도 있긴한데
0
172
0
화면이 오류가 안뜨는데
0
237
0
해결은 했지만 궁금합니다.
0
186
0
config폴더에 있는것과 accounts폴더에 있는 것들은 어떻게 다른건가요?
0
358
1
acoount 아래에 urls.py가 없는데 만들어야하나요?
0
191
1
링크가 안생겨요
0
203
1
상위폴더로 어떻게 이동하나요?
0
1112
1
psql이 안돼요
0
212
0
똑같이 했는데 오류가 뜹니다
0
288
1
6분 54초
0
180
0
저도 왜 좋아요가 안뜨는 걸까요?
1
539
6
top :50% 가 왜 가운데로 안가는건가요?
0
456
1

