blob: 3ccdb1f468e41cdd40fc26436c2a86839754f49f (
plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
/*-- menu principal --*/
#nav_zone
{
height: 33px;
}
.nav_main
{
position: fixed;
/*box-shadow: 3px 3px 5px #13aff0;*/
border: 2px solid #13aff0;
top: -2px;
}
.nav_main
{
/*font-size: 90%;*/
/*margin-top: 10px;*/
/*margin-bottom: 10px;*/
text-wrap: nowrap;
background-color: #ffffffe1; /* b3 = 179 = 0.7 (x 256) */
}
.nav_main > ul
{
display: flex;
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
}
ul
{
margin: 0;
}
.nav_main ul
{
list-style: none;
padding-left: 0;
}
.nav_main li
{
list-style: none;
padding: 7px;
}
.nav_main p
{
display: inline-block; /* à cause du bouton sub-menu-toggle */
margin: 0;
/*background-color: #ffffffe1;*/ /* b3 = 179 = 0.7 (x 256) */
}
.nav_main > ul > li:hover
{
background-color: white;
}
.current/* > a > p*/
{
background-color: white;
font-weight: bold;
}
li:not(.current){
background-color: initial;
font-weight: initial;
}
/* faire apparaître les sous-menu sur PC */
.drop-down:hover > .sub-menu,
.drop-right:hover > .sub-menu
{
display: block;
}
@media (pointer: fine) /* fine => précision de la souris */
{
.drop-down > a > p::after
{
content: ' ▼';
font-size: x-small;
}
.drop-right > a > p:after
{
content: " ▶";
font-size: x-small;
}
}
/* faire apparaître les sous-menu sur smartphone */
.sub-menu-toggle
{
display: none; /* masqué par défaut */
background: none;
/*border: none;*/
cursor: pointer;
font-size: x-small;
vertical-align: text-bottom;
}
@media (pointer: coarse) /* coarse = grossier = précision écran tactile */
{
.sub-menu-toggle
{
display: inline-block; /* visible sur écran tactile */
}
.drop-down.open > .sub-menu,
.drop-right.open > .sub-menu
{
display: block;
}
}
.sub-menu
{
display: none;
background-color: white;
border-top: 3px solid #13aff0;
box-shadow: 1px 1px 3px black;
font-size: 95%;
}
.sub-menu li:hover /* écrase le fond blanc placé en même temps */
{
background-color: yellow;
}
/* 1er sous-menu, poitionnement pour ne pas aggrandir l'élément parent */
nav > ul > li > ul
{
position: absolute; /* retire du flux, positionnement par rapport à la fenêtre */
}
/* élément du menu survolé, le positionnement relatif en fait la référence du positionnement suivant */
.drop-right
{
position: relative;
}
.drop-right .sub-menu
{
position: absolute; /* positionnement par rapport au précédent "position" en CSS */
left: 100%;
top: -3px; /* la bordure bleue fait 3px */
}
|