powered by simpleCommunicator - 2.0.59     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Туплю <li><ul>.... hover
2 сообщений из 2, страница 1 из 1
Туплю <li><ul>.... hover
    #34899703
WEB_bobby
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Всю ночь не спал - туплю.
Есть выпадающее меню.
Не могу придумать никак. Как же сделать когда мышь находится на любом из элементов выпавшего списка, чтобы и само оглавление списка тоже имело состояние: нажато?



Код: plaintext
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.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<title>Меню</title>
	
	<style type= "text/css" >
	body,html{height: 100 %; margin:0px;}
	
	#nav{width: 770px;}
	
	ul{margin:  0 ; padding:  0 ; height:46px; list-style: none}
	
	li:hover ul {display: block; width:190px}
	
	.m{float:left; height:46px; width:128px;}
	
	.m ul{
	position: absolute; top:  0 ; display: none; 
	margin:46px  0   0   0 ;
	border-right: 1px solid # 666666 ;
	border-bottom: 1px solid # 666666 ;
	border-left: 1px solid #dddddd;
	height:auto;
	background:#00ff00}
	
	

	
	ul li a {display: block; text-decoration: none; color: # 777 ; background:#ffffff; padding: 5px; font: normal 12px Verdana}
	
	.m a.f:link {color:# 666666 ; height:36px; background:url('mf.gif')}
	.m a.f:visited {color:# 666666 ; height:36px;  background:url('mf.gif')}
	.m a.f:hover {color:#e50000; height:36px; background:url('mfd.gif')} 
	
	.m a:link {color:# 999999 }
	.m a:visited {color:# 999999 }
	.m a:hover {color:#e50000} 
	
	
	/* Fix IE. Hide from IE Mac \*/
	* html ul li { float: left; }
	* html ul li a { height:  1 %; }
	/* End */
	
	#lastUl{margin-left:-64px;}
	
	.m li:hover .m li:link {color:#e50000; height:36px; background:url('mfd.gif')}
	.m li:hover .m li:visited {color:#e50000; height:36px; background:url('mfd.gif')}

	</style>
	
	<script language = "javascript" type = "text/javascript">
		
		startList = function() {
      if (document.all&&document.getElementById) {
            navRoot = document.getElementById("nav");
            for (i= 0 ; i<navRoot.childNodes.length; i++) {
                  node = navRoot.childNodes[i];
                  if (node.nodeName=="LI") {
                        node.onmouseover=function() {
                              this.className+=" over";
							  this.childNodes[ 2 ].style.width =  190  + "px";
							  
                        }
                        node.onmouseout=function() {
                              this.className=this.className.replace(" over", "");
                        }
                  }
            }
      }
}
window.onload=startList;
	</script>
	
</head>

<body>

<ul id = "nav"> 
	
     <li class = "m"><a class = "f" href="#">Модельный ряд</a> 
        <ul> 
           <li><a href="#">Yaris</a></li> 
           <li><a href="#">Auris</a></li> 
        </ul> 
     </li>
</ul>
</body>
</html>
...
Рейтинг: 0 / 0
Туплю <li><ul>.... hover
    #34899784
WEB_bobby
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Тема закрыта.
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / Туплю <li><ul>.... hover
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]