저는 최근에 첫 번째 웹 사이트를 구축했으며 (많은 시행 착오를 거쳐) 처음 페이지를 조금 아래로 스크롤하면 내비게이션을 클릭하면 드롭 다운을 클릭 할 수 없습니다. 나는 그것을 고치려고 미쳐 가고있다. 아무도 도와 줄 수 있습니까? 사이트는 다음 위치에 있습니다. http://lamplighters.org/education/smw.html페이지가 스크롤 될 때만 갭이 드롭 다운 내비게이션에 나타납니다.
답변
CSS에서 요소와 함께 설정되는 위치 문제인 것으로 보입니다. html과 css 코드를 보는 것이 도움이 될 것입니다.
동의 :'#nav li ul { 위치 : 고정; ' – showdev
@ user2566180 당신은 절대로 변경할 수 있습니다. – JRW2252
둘 다 감사합니다! 그 종류의 일하지만 머리글에 스크롤 막대를 추가하고 * 스크롤되지 않을 때 텍스트 숨김. 나는 이것을 잠시 동안 할 것이고, 나는 그것을 전에 보았던 것을 기억하지 못한다. – user2566180
나는 당신이 position: fixed
을 사용했다는 사실과 관련이 있다고 말할 수 있습니다. CSS에 대한 일련의 다른 문제도 있습니다.
나는 페이지를 inspeceted하고 탐색을 위해 잘 오지 않았던 많은 것들을 발견했다. 좋은 관리는 순서에 있지 않습니다.
#nav, #nav ul {/*By doing this you are setting these attributes to both the nav div and the nav ul*/
padding: 0;
margin: 0;
list-style: none;
line-height: 1;
text-align: center;
}
#nav, #nav ul {/*By doing this you are setting these attributes to both the nav div and the nav ul. This is redundant and should be consolodated into a single #nav, #nav ul, if you are going to use these assigned attributes. */
padding: 0;
margin: 0;
list-style: none;
display: inline-block;
}
ul {/*By doing this you are only targeting any ul on the page*/
list-style: none outside;
}
ul, ol {/*By doing this are targeting both ordered lists and unordered lists to have these attributes*/
margin-bottom: 20px;
}
ol, ul {/*By doing this are targeting both ordered lists and unordered lists to have these attributes*/
list-style: none;
}
#nav li {
float: left;
width: 137px;
text-transform: capitalize;
display: inherit;
position: relative;
}
li {
line-height: 18px;
margin-bottom: 12px;
}
네비게이션 CSS를 깨끗이 닦고 처음부터 시작할 수 있습니다. 나는 CSS 파일을 가져와 아래에 넣었다. 이것이 도움이되기를 바랍니다. 앞으로 귀하의 sytle 시트와 행운을 빌어 요.
#menu{
width: 960px;
margin: 50px 0 0 0;
padding: 10px 0 0 0;
list-style: none;
}
#menu li{
float: left;
padding: 0 0 10px 0;
position: relative;
}
#menu a{
float: left;
height: 25px;
padding: 0 60px;
text-decoration: none;
}
/*Text Color for the anchors*/
#menu li:hover > a{
color: #FFFFFF;
}
*html #menu li a:hover{ /* IE6 */
color: #FFFFFF;
}
#menu li:hover > ul{
display: block;
}
/* Sub-menu */
#menu ul{
list-style: none;
margin: 0 35px;
padding: 0 15px;
display: none;
position: absolute;
top: 35px;
left: 0;
z-index: 99999;
}
#menu ul li{
float: none;
margin: 0;
padding: 0;
display: block;
}
#menu ul a{
padding: 10px;
height: auto;
line-height: 1;
display: block;
white-space: nowrap;
float: none;
text-transform: none;
}
*html #menu ul a{ /* IE6 */
height: 10px;
width: 150px;
}
*:first-child+html #menu ul a{ /* IE7 */
height: 10px;
width: 150px;
}
#menu ul a:hover{
/*add a background position*/
background-position: left top;
}
#menu ul li:first-child a{
}
#menu ul li:first-child a:after{
content: '';
position: absolute;
left: 30px;
top: -8px;
width: 0;
height: 0;
}
#menu ul li:first-child a:hover:after{
/*add color scheme*/
}
#menu ul li:last-child a{
}
/* Clear floated elements */
#menu:after{
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
* html #menu { zoom: 1; } /* IE6 */
*:first-child+html #menu { zoom: 1; } /* IE7 */
- 1. 페이지가 스크롤 될 때만 페이지에 항목을로드하는 방법?
- 2. CSS 드롭 다운 - 갭이 필요함
- 3. 스크롤 막대는 오버플로가있을 때만 나타납니다.
- 4. 페이지가 맨 위로 스크롤 될 때만 태그 표시
- 5. 새로 고침을 눌렀을 때만 웹 페이지가 나타납니다.
- 6. 페이지가 iOS에서 화면을 회전 할 때만 나타납니다.
- 7. CSS 드롭 다운 메뉴가 나타납니다.
- 8. Greasemonkey 스크립트는 페이지가 다시로드 될 때만 실행됩니다.
- 9. 페이지가 스크롤 될 때를 감지합니다.
- 10. 페이지가 다시로드 될 때 드롭 다운 목록의 선택된 항목을 유지하십시오.
- 11. 드롭 내가 드롭 다운 목록이있는 페이지가 OnSelectedIndexChanged
- 12. 드롭 다운 목록에 세로 스크롤 막대를 구현하십시오.
- 13. I라는 하나의 드롭 다운 이름이 한 페이지가 드롭 다운
- 14. 위로 ASP.NET 스크롤 다운 드롭 다운 목록
- 15. JQuery와 스크롤 바는 드롭 다운
- 16. 드롭 다운 목록의 스크롤 막대
- 17. 드롭 다운 목록의 스크롤 막대
- 18. div가 오른쪽으로 이동하면 드롭 다운 메뉴가 나타납니다.
- 19. 드롭 다운 메뉴가 플래시 비디오 뒤에 나타납니다
- 20. ComboBox 드롭 다운 창이 아래에 나타납니다.
- 21. 드롭 다운 선택 페이지 아래에 나타납니다.
- 22. 콘텐츠 영역 아래에 드롭 다운 메뉴가 나타납니다.
- 23. 페이지가 스크롤 될 때 머리글 배경색을 변경하십시오.
- 24. 페이지가 스크롤 될 때 이미지 회전
- 25. 페이지가 완전히로드 될 때 창 스크롤 위치
- 26. 페이지가 스크롤 될 때 div에 애니메이션 적용
- 27. 페이지가 스크롤 될 때로드 마스크가 스크롤되지 않습니다.
- 28. IE9 +에서 jQuery의 페이지가 스크롤 될 때
- 29. Multiline TextBox의 vbCrLf는 .Trim()이 호출 될 때만 나타납니다.
- 30. Xcode 브레이크 포인트는 디버깅 중에 설정 될 때만 나타납니다.
여기에 관련 코드를 게시하십시오 (질문 편집 및 코드 포함). –