Ребята, помогите разобраться!
Всем, здравствуйте!
Помогите разобраться кому не трудно! Ситуация следующая: Установил скрипт вращения изображений - http://jsfiddle.net/Tinclon/2ega7yLt/7/ Все работает! Но блоков с изображениями несколько и получается, что при наведении на один блок, крутятся все.:cray: Может кто-то сталкивался с подобным. Заранее ОГРОМНОЕ СПАСИБО! |
Tord002,
http://jsfiddle.net/2ega7yLt/294/ вопрос только зачем скрипт? http://jsfiddle.net/2ega7yLt/295/ |
Вы гений! Очень выручили! Подскажите, что имеенно подшаманили?
|
Tord002,
в последнем заменил в css .applyflip на :hover а в первом скрипт перед вами ... убрал лишнее |
Ну я же и говорю, что Вы гений!
Еще раз благодарю, что очень оперативно и по человечески помогли! Спасибо Вам! |
Цитата:
|
http://myrusakov.ru/css-click.html может это поможет?
|
Цитата:
|
Уже пробую разораться в предложенных вариантах!
Последняя задача: На данный момент картинка при наведении переворачивается и при отведении переворачивается в исходное положение. Необходимо чтобы второго переворота не было. Похоже надо все таки скрип на онклик |
css переворот по клику
Цитата:
<!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>3D Card Flip - ALL BROWSERS - (with static content) - jsFiddle demo</title> <style type='text/css'> .card { perspective: 1000px; -webkit-perspective: 1000px; -moz-perspective: 1000px; -o-perspective: 1000px; -ms-perspective: 1000px; margin:80px 150px; width:320px; height:243px; vertical-align:top; position:absolute; display:block; font-size:25px; font-weight:bold; } .card .content { transition: 0.5s ease-out; -webkit-transition: 0.5s ease-out; -moz-transition: 0.5s ease-out; -o-transition: 0.5s ease-out; -ms-transition: 0.5s ease-out; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; -o-transform-style: preserve-3d; -ms-transform-style: preserve-3d; /* content backface is visible so that static content still appears */ backface-visibility: visible; -webkit-backface-visibility: visible; -moz-backface-visibility: visible; -o-backface-visibility: visible; -ms-backface-visibility: visible; border: 1px solid grey; border-radius: 15px; position:relative; width: 100%; height: 100%; } .card :checked + .content { transform: rotateY(180deg); -webkit-transform: rotateY(180deg); -moz-transform: rotateY(180deg); -o-transform: rotateY(180deg); -ms-transform: rotateY(180deg); } .card .content .cardStatic { /* Half way through the card flip, rotate static content to 0 degrees */ transition: 0s linear 0.17s; -webkit-transition: 0s linear 0.17s; -moz-transition: 0s linear 0.17s; -o-transition: 0s linear 0.17s; -ms-transition: 0s linear 0.17s; transform: rotateY(0deg); -webkit-transform: rotateY(0deg); -moz-transform: rotateY(0deg); -o-transform: rotateY(0deg); -ms-transform: rotateY(0deg); text-align: center; position: absolute; top: 0; left: 0; height: 0; width: 100%; line-height:100px; } .card :checked + .content .cardStatic { /* Half way through the card flip, rotate static content to -180 degrees -- to negate the flip and unmirror the static content */ transition: 0s linear 0.17s; -webkit-transition: 0s linear 0.17s; -moz-transition: 0s linear 0.17s; -o-transition: 0s linear 0.17s; -ms-transition: 0s linear 0.17s; transform: rotateY(-180deg); -webkit-transform: rotateY(-180deg); -moz-transform: rotateY(-180deg); -o-transform: rotateY(-180deg); -ms-transform: rotateY(-180deg); } .card .content .cardFront { background-color: skyblue; color: tomato; } .card .content .cardBack { background-color: tomato; color: skyblue; } .card .content .cardFront, .card .content .cardBack { /* Backface visibility works great for all but IE. As such, we mark the backface visible in IE and manage visibility ourselves */ backface-visibility: hidden; -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden; -o-backface-visibility: hidden; -ms-backface-visibility: visible; position: absolute; top: 0; left: 0; height: 100%; width: 100%; text-align: center; line-height:200px; border-radius: 14px; } .card .content .cardFront, .card :checked + .content .cardFront { transform: rotateY(0deg); -webkit-transform: rotateY(0deg); -moz-transform: rotateY(0deg); -o-transform: rotateY(0deg); -ms-transform: rotateY(0deg); } .card .content .cardBack, .card :checked + .content .cardBack { transform: rotateY(-180deg); -webkit-transform: rotateY(-180deg); -moz-transform: rotateY(-180deg); -o-transform: rotateY(-180deg); -ms-transform: rotateY(-180deg); } .card .content .cardFront, .card :checked + .content .cardBack { /* IE Hack. Halfway through the card flip, set visibility. Keep other browsers visible throughout the card flip. */ animation: stayvisible 0.5s both; -webkit-animation: stayvisible 0.5s both; -moz-animation: stayvisible 0.5s both; -o-animation: stayvisible 0.5s both; -ms-animation: donothing 0.5s; -ms-transition: visibility 0s linear 0.17s; visibility: visible; } .card :checked + .content .cardFront, .card .content .cardBack { /* IE Hack. Halfway through the card flip, set visibility. Keep other browsers visible throughout the card flip. */ animation: stayvisible 0.5s both; -webkit-animation: stayvisible 0.5s both; -moz-animation: stayvisible 0.5s both; -o-animation: stayvisible 0.5s both; -ms-animation: donothing 0.5s; -ms-transition: visibility 0s linear 0.17s; visibility: hidden; } @keyframes stayvisible { from { visibility: visible; } to { visibility: visible; } } @-webkit-keyframes stayvisible { from { visibility: visible; } to { visibility: visible; } } @-moz-keyframes stayvisible { from { visibility: visible; } to { visibility: visible; } } @-o-keyframes stayvisible { from { visibility: visible; } to { visibility: visible; } } @-ms-keyframes donothing { 0% { } 100% { } } .card input{ display: none; } </style> </head> <body> <div class="card"><label for="qwer"><input type="checkbox" id="qwer"> <div class="content"> <div class="cardFront">FRONT CONTENT</div> <div class="cardBack">BACK CONTENT</div> <div class="cardStatic">STATIC CONTENT</div> </div></label> </div> <div class="card" style="top: 300px"><label for="dfg"><input type="checkbox" id="dfg"> <div class="content"> <div class="cardFront">FRONT CONTENT</div> <div class="cardBack">BACK CONTENT</div> <div class="cardStatic">STATIC CONTENT</div> </div></label> </div> </body> </html> |
Часовой пояс GMT +3, время: 16:18. |