Форум программистов, компьютерный форум, киберфорум
HTML, CSS
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.80/5: Рейтинг темы: голосов - 5, средняя оценка - 4.80
0 / 0 / 0
Регистрация: 01.11.2016
Сообщений: 6

Как сделать активным автоматически, а не при наведении?

24.07.2017, 01:39. Показов 1208. Ответов 2
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Есть меню:
HTML5
1
2
3
4
5
6
7
8
9
  <li class="grid-item" data-jkit="[show:delay=3000;speed=500;animation=fade]">
      <img src="{THEME}/img/portfolio/5.jpg">
        <a class="ajax-link" href="single.html">  
          <div class="grid-hover">
            <h1>Single</h1>
            <p>Branding</p>
          </div>
        </a>      
    </li>
и ксс
CSS
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
@import url([url]http://fonts.googleapis.com/css?family=Raleway:400,300,500,600,700,800,900,100,200);[/url]
 
body{
  font-family: 'Raleway', sans-serif;
  font-size:14px;
  font-weight: 400;
  overflow-y:scroll;
  -webkit-font-smoothing: antialiased;
}
 
::selection {
        background: #000;
        color: #fff;
        text-shadow: none;
    }
    
    ::-moz-selection {
        background: #000;
        color: #fff;
        text-shadow: none;
    }
 
p{
  font-family: 'Raleway', sans-serif;
  font-size:14px;
  font-weight: 400;
}
 
a{
  text-decoration:none;
  -webkit-transition: all 0.2s ease-in;
    -moz-transition: all 0.2s ease-in;
    -ms-transition: all 0.2s ease-in;
    -o-transition: all 0.2s ease-in;
    transition: all 0.2s ease-in; 
    border-bottom:1px solid #dedede;
}
 
a:focus {
  outline:none;
}
 
strong{
  font-weight:700;
 
}
 
/*
**************************
PRELOADER
**************************
*/
 
.preloader{
  position:fixed;
  top:0;
  width:100%;
  height:100%;
  background:white;
  z-index:999;
}
 
.preloader .item{
  position:absolute;
  width:50px;
  height:50px;
  left:50%;
  top:50%;
  margin-left:-25px;
  margin-top:-25px;
} 
 
.spinner {
  width: 40px;
  height: 40px;
  margin: 0px auto;
  background-color: #333;
  border-radius: 100%;  
  -webkit-animation: scaleout 1.0s infinite ease-in-out;
  animation: scaleout 1.0s infinite ease-in-out;
}
 
@-webkit-keyframes scaleout {
  0% { -webkit-transform: scale(0.0) }
  100% {
    -webkit-transform: scale(1.0);
    opacity: 0;
  }
}
 
@keyframes scaleout {
  0% { 
    transform: scale(0.0);
    -webkit-transform: scale(0.0);
  } 100% {
    transform: scale(1.0);
    -webkit-transform: scale(1.0);
    opacity: 0;
  }
}
 
 
 
 
 
/*
**************************
NAVIGATION OPACITY
**************************
*/
 
 
 
.opacity-nav{
  position:fixed;
  display:none;
  width:100%;
  height:100%;
  top:0;
  z-index:9999;
  background:rgba(0,0,0,0.95);
}
 
ul.menu-fullscreen{
  width: 100%;
  top: 50%;
  position: absolute;
  height: 280px;
  margin-top: -140px;
}
 
ul.menu-fullscreen li{
  font-size:35px;
  text-align:center;
  line-height:70px;
  font-weight:500;
}
 
ul.menu-fullscreen li > a{
  color:#999999;
  border:0;
}
 
ul.menu-fullscreen li > a:hover{
  color:#ffffff;
}
 
 
#full{
  width:1140px;
  position: relative;
  top:0;
  margin:0 auto;
  z-index: 9997;
}
 
 
#fullscreen{
  display:none;
  position:absolute;
  top:0;
  width:100%;
  margin:0 auto;
  height:80px;
  z-index: 9998;
}
 
/*
**************************
HEADER
**************************
*/
 
header.boxed{
  position:fixed;
  width:100%;
  margin:0 auto;
  height:80px;
  z-index:9999;
  display:none;
  background:none;
  top:0;
    -webkit-transition: background 0.2s ease-in;
    -moz-transition: background 0.2s ease-in;
    -ms-transition: background 0.2s ease-in;
    -o-transition: background 0.2s ease-in;
    transition: background 0.2s ease-in; 
}
 
header.boxed .header-margin{
  width:1140px;
  margin:0 auto;
}
 
header.boxed .header-margin-mini{
  width:90%;
  margin:0 auto;
}
 
 
ul.social-icon{
  float:right;
}
 
ul.social-icon a{
  float:right;
  font-size:15px;
  border-bottom:0;
  color:black;
  padding-right:0px !important;
}
 
ul.social-icon a:hover{
  color:#c3c3c3;
}
 
.menu-index{
  position: fixed;
  right: 5%;
  top: 30px;
  z-index: 99999;
  padding:20px;
  background:black;
  cursor:pointer;
}
 
 
.menu-index i{
  float:right;
  font-size:18px;
  color:white;
  padding-right:0px !important;
}
 
.menu-index i:hover{
  color:#c3c3c3;
}
 
 
ul.menu-icon{
  float:right;
}
 
ul.menu-icon a{
  float:right;
  font-size:19px;
  color:white;
  padding-right:0px !important;
}
 
ul.menu-icon i{
  padding:20px;
  background:black;
}
 
ul.menu-icon a:hover{
  color:#c3c3c3;
}
 
header a{
  color:#000000;
}
 
ul.header-nav{
  width:60%;
  float:left;
}
 
header .logo > a{
  font-size:23px;
  font-weight:800;
  float:left;
  line-height:80px;
  padding-right:40px;
  border-bottom: 1px solid #f1f1f1;
}
 
header .logo > a:hover{
  color:#c3c3c3;
}
 
header li{
  text-transform:uppercase;
  list-style-type: none; margin: 0 auto; float: left;
}
 
header li > a{
  font-size:13px;
  color:#c3c3c3;
  padding-right:25px;
  padding-left:25px;
  font-weight:800;
  line-height:80px;
  display:inline-block;  
  border-bottom:0;
}
 
header li > a:hover{
  color:#000000;
}
 
header li > a #active{
  color:#000000;
}
 
header li ul{
  overflow: hidden; display: none; background: #f9f9f9; z-index:20;
}
 
header li ul li a{
  line-height:50px;
  padding-left:30px; 
  width:260px;
}
 
header li:hover ul{
  position: absolute; padding: 0; display: block; width: 260px;
}
 
 
 
/*
**************************
CONTENT
**************************
*/
 
.hero-image{
  position:relative; 
  width:100%; 
  top:0; 
  height:400px; 
  background: url('../img/full/full.jpg') center center;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;  
  
}
 
.one-column{
  width:40%;
  position:relative;
  float:left;
}
 
.two-column{
  width:60%;
  position:relative;
  float:left;
}
 
.one-column p{
  width:70% !important;
}
 
.two-column p{
  width:100% !important;
}
 
.clear{
  clear:both;
}
 
.content{
  position:relative;
  width:1140px;
  margin:50px auto;
}
 
 
.content .text-intro{
  width: 1140px;
  margin-top: 150px;
  margin: 150px auto 0;
}
 
.content .text-intro h1{
  font-size:43px;
  width:40%;
  text-transform:uppercase;
  color:#000000;
  font-weight:900;
  line-height:70px;
}
 
.content .text-intro p{
  font-size:13px;
  color:#8d8d8d;
  margin-top:30px;
  font-weight:400;
  line-height:22px;
  letter-spacing:1px;
  width:40%;
}
 
        .typed-cursor{
            opacity: 1;
            font-weight: 900;
            -webkit-animation: blink 0.7s infinite;
            -moz-animation: blink 0.7s infinite;
            -ms-animation: blink 0.7s infinite;
            -o-animation: blink 0.7s infinite;
            animation: blink 0.7s infinite;
        }
        @-keyframes blink{
            0% { opacity:1; }
            50% { opacity:0; }
            100% { opacity:1; }
        }
        @-webkit-keyframes blink{
            0% { opacity:1; }
            50% { opacity:0; }
            100% { opacity:1; }
        }
        @-moz-keyframes blink{
            0% { opacity:1; }
            50% { opacity:0; }
            100% { opacity:1; }
        }
        @-ms-keyframes blink{
            0% { opacity:1; }
            50% { opacity:0; }
            100% { opacity:1; }
        }
        @-o-keyframes blink{
            0% { opacity:1; }
            50% { opacity:0; }
            100% { opacity:1; }
        }
 
/*
**************************
HOME SIDEBAR
**************************
*/
 
.home-sidebar{
  top:0;
  position:absolute;
  width:33.3333%;
  right:0;
  height:100%;
  background:#f4f4f4;
  z-index:9;
  overflow:hidden;
  background-size:100%;
}
 
.parallax{
  position:absolute;
}
 
.parallax-option{
  position:absolute; width:100%; height:100%;
}
 
/*
**************************
PORTFOLIO GRID
**************************
*/
 
.prev-next{
  width:100%;
  max-width:1170px;
  margin:0 auto;
  padding-top:100px;
}
 
.prev-next a{
  color:black;
  font-weight:500;
  padding-bottom: 15px;
}
 
.prev-next a:hover{
  border-bottom:1px solid black;
}
 
.prev-button{
  width:50%;
  position:relative;
  float:left;
  text-align:left;
}
 
.next-button{
  width:50%;
  position:relative;
  float:left;
  text-align:right;
}
 
 
#ajax-content{width:100%;}
 
.portfolio-grid{
  width:1170px;
  position:relative;
  margin: 30px auto;
  overflow:hidden;
}
 
#portfolio-sidebar{
  width: 780px !important;
  padding-right: 390px;
 
}
 
li.grid-item{
  width:360px;
  position:relative;
  float:left;
  padding:15px;
}
 
.grid-hover{
  position: absolute;
  width:360px;
  height: 100%;
  top:0;
  background: white;
  z-index: 2;
  opacity: 0;
  -webkit-transition: all 0.2s ease-in;
    -moz-transition: all 0.2s ease-in;
    -ms-transition: all 0.2s ease-in;
    -o-transition: all 0.2s ease-in;
    transition: all 0.2s ease-in; 
}
 
.grid-hover:hover{
  opacity: 0.9;
}
 
.grid-hover h1{
  font-size:23px;
  bottom:80px;
  left:40px;
  position:absolute;
  text-transform:uppercase;
  color:#000000;
  letter-spacing:1px;
  font-weight:900;
  line-height:50px;
}
 
.grid-hover p{
  font-size:13px;
  bottom:40px;
  left:40px;
  position:absolute;
  color:#686868;
  letter-spacing:1px;
  font-weight:400;
  line-height:50px;
}
 
li.grid-item img{
  width:360px;
}
 
/*
**************************
FOOTER
**************************
*/
 
#footer-box{height:150px; margin-top:75px;}
 
footer{
  background: #f1f1f1;
  width:100%;
  margin-top:150px;
  height:300px;
  overflow:hidden;
  position:relative;
  z-index:10;
}
 
.footer-margin{
  width:1140px;
  margin: 30px auto;
  line-height: 100px;
}
 
#footer-left{text-align:left;}
 
.footer-margin .copyright{
  color: #686868;
  letter-spacing: 1px;
  font-size: 12px;
  width: 100%;
  text-align:center;
  float: left;
}
 
.footer-margin .social-footer{
  color: #686868;
  letter-spacing: 1px;
  font-size: 13px;
  width: 100%;
  text-align:center;
  float: left;
}
 
.footer-margin .social-footer a{
  font-size:15px;
  color:black;
  padding: 20px;
}
 
.footer-margin .social-footer a:hover{
  color:#c3c3c3;
}
 
 
/*
**************************
CONTACT
**************************
*/
 
.contact-one, .contact-two{
  width:30%;
  padding-right:3%;
  position:relative;
  float:left;
}
 
.contact-three{
  width:33%;
  position:relative;
  float:left;
}
 
.contact-one p, .contact-two p, .contact-three p{
  width:100% !important;
}
 
input{
 
  width:100%;
  height:40px;
  background:#f8f7f7;
  border:0;
  color:#000000;
  font-weight:500;
  line-height:40px;
  font-family: 'Raleway', sans-serif;
  margin-bottom:10px;
  font-size:13px;
  padding-left:15px;
  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box;    /* Firefox, other Gecko */
  box-sizing: border-box;         /* Opera/IE 8+ */
}
 
input.button-submit{
 
  width:220px;
  height:40px;
  background:#f8f7f7;
  font-weight:500;
  border:0;
  font-family: 'Raleway', sans-serif;
  color:#000000;
  float:right;
  font-weight:900;
  line-height:40px;
  font-size:13px;
}
 
input:focus{
  background:#f4f4f4; 
}
 
textarea{
 
  width:100%;
  height:40px;
  border:0;
  line-height:40px;
  background:#f8f7f7;
  color:#000000;
  font-size:13px;
  font-family: 'Raleway', sans-serif;
  font-weight:500;
  margin-bottom:10px;
  padding:0 0 0 15px;
  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box;    /* Firefox, other Gecko */
  box-sizing: border-box;         /* Opera/IE 8+ */
    -webkit-transition: all 0.2s ease-in;
    -moz-transition: all 0.2s ease-in;
    -ms-transition: all 0.2s ease-in;
    -o-transition: all 0.2s ease-in;
    transition: all 0.2s ease-in; 
}
 
textarea:focus{background:#f4f4f4; height:250px;}
Суть вот в чем: при наведении появляется название и описание, а сама картинка становится полу прозрачной. А если не наводить, то картинка не прозрачна

А как сделать наоборот? Чтобы изначально была полупрозрачная картинка и описание, без всяких наведений.

живой пример: https://student.ru.com/
Миниатюры
Как сделать активным автоматически, а не при наведении?   Как сделать активным автоматически, а не при наведении?  
0
Programming
Эксперт
39485 / 9562 / 3019
Регистрация: 12.04.2006
Сообщений: 41,671
Блог
24.07.2017, 01:39
Ответы с готовыми решениями:

Как сделать Checked List Box активным при наведении мыши?
Имется некий checkedListbox1 в котором некоторые значения, не суть. Чтобы поставить галочку напротив значения, нужно сначала...

Сделать приложение активным при наведении курсора
Activate() не помогает. Весь эффект от него - на панели задач значок приложения начинает мигать. И хэндл моего приложения остаётся...

Сделать так, чтобы при наведении мыши, список становился активным
Дело такое. Помогите, пожалуйста. Есть форма со списком. Нужно сделать так, чтобы при наведении мыши, список становился активным. Т.е....

2
28 / 28 / 8
Регистрация: 23.12.2015
Сообщений: 97
24.07.2017, 11:14
CSS
1
2
.grid-hover {
    opacity: 1;}
или вообще удалите свойство opacity
1
84 / 81 / 42
Регистрация: 20.01.2017
Сообщений: 219
24.07.2017, 11:18
на 533 строчке вашего css задано правило для прозрачности блока с описанием при наведении. Если вам не нужен этот эффект удалите
CSS
1
2
3
.grid-hover:hover{
  opacity: 0.9;
}
а прозрачность меняйте выше
CSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
.grid-hover{
  position: absolute;
  width:360px;
  height: 100%;
  top:0;
  background: white;
  z-index: 2;
  opacity: 0;          /* прозрачность*/
  -webkit-transition: all 0.2s ease-in;
    -moz-transition: all 0.2s ease-in;
    -ms-transition: all 0.2s ease-in;
    -o-transition: all 0.2s ease-in;
    transition: all 0.2s ease-in; 
}
1
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
inter-admin
Эксперт
29715 / 6470 / 2152
Регистрация: 06.03.2009
Сообщений: 28,500
Блог
24.07.2017, 11:18
Помогаю со студенческими работами здесь

Можно ли сделать так что при наведении мыши на часть слоя, который ниже активного - сам становился активным?
Ситуация такая у меня есть n кол-во слоев, причем некоторые (точнее их части) перекрывают другие... Можно ли сделать так что при...

Unity имеется GameObject который при старте игры в Меню НЕ АКТИВНЫМ. нужно сделать его активным
Unity имеется GameObject под названием &quot;Player&quot;который при старте игры в (scene Menu) НЕ АКТИВНЫЙ. Нужно чтобы при смене сцены на (scene...

отменить то, что при наведении курсора окно становиться активным
Подскажите пожалуйста, как отменить то, что при наведении курсора окно становиться активным(без щелчка по окну, а только от...

Как сделать активным приложение при выходе из трея C#
сворачиваю через notifyIcon в трей, потом при двойном щелчке: private void notifyIcon1_MouseDoubleClick(object sender,...

Как сделать showDialog активным при нажатии на основное окно?
Например есть два окно основное и окно вызванное showDialog(). Открыли после этого браузер или любую папку, и окно showDialog() скрылось...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
3
Ответ Создать тему
Новые блоги и статьи
Использование SDL3-callbacks вместо функции main() на Android, Desktop и WebAssembly
8Observer8 24.01.2026
Если вы откроете примеры для начинающих на официальном репозитории SDL3 в папке: examples, то вы увидите, что все примеры используют следующие четыре обязательные функции, а привычная функция main(). . .
моя боль
iceja 24.01.2026
Выложила интерполяцию кубическими сплайнами www. iceja. net REST сервисы временно не работают, только через Web. Написала за 56 рабочих часов этот сайт с нуля. При помощи perplexity. ai PRO , при. . .
Модель сукцессии микоризы
anaschu 24.01.2026
Решили писать научную статью с неким РОманом
http://iceja.net/ математические сервисы
iceja 20.01.2026
Обновила свой сайт http:/ / iceja. net/ , приделала Fast Fourier Transform экстраполяцию сигналов. Однако предсказывает далеко не каждый сигнал (см ограничения http:/ / iceja. net/ fourier/ docs ). Также. . .
http://iceja.net/ сервер решения полиномов
iceja 18.01.2026
Выкатила http:/ / iceja. net/ сервер решения полиномов (находит действительные корни полиномов методом Штурма). На сайте документация по API, но скажу прямо VPS слабенький и 200 000 полиномов. . .
Расчёт переходных процессов в цепи постоянного тока
igorrr37 16.01.2026
/ * Дана цепь(не выше 3-го порядка) постоянного тока с элементами R, L, C, k(ключ), U, E, J. Программа находит переходные токи и напряжения на элементах схемы классическим методом(1 и 2 з-ны. . .
Восстановить юзерскрипты Greasemonkey из бэкапа браузера
damix 15.01.2026
Если восстановить из бэкапа профиль Firefox после переустановки винды, то список юзерскриптов в Greasemonkey будет пустым. Но восстановить их можно так. Для этого понадобится консольная утилита. . .
Сукцессия микоризы: основная теория в виде двух уравнений.
anaschu 11.01.2026
https:/ / rutube. ru/ video/ 7a537f578d808e67a3c6fd818a44a5c4/
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru