Jump to content

Recommended Posts

Здравствуйте, подскажите пожалуйста как сделать зависимость одного элемента от другого. Т.е, хочу сделать так что бы при наведении на картинку (в категории товаров) название товара приобретало свойство своего hover. Как такое можно реализовать и можно ли вообще через css. 

 

Сама страничка - http://bestpw.tk/production/

Share this post


Link to post
Share on other sites

Тоесть при наведении на какойто блок, у другого блока срабатывал другой стиль?

Share this post


Link to post
Share on other sites

Да можно, только через jquery используя события mousemove и  mouseleave

Share this post


Link to post
Share on other sites
.product-grid .product-thumb .image:hover + div .caption h4 a {
	color:red 
}

 

Share this post


Link to post
Share on other sites

.product-layout .image:hover+div h4 a{
    transition: 0.4s;
    text-shadow: 1px 1px 11px #717171;
}
.product-layout .image:hover+div h4 a:after {
    content: "";
    display: block;
    position: relative;
    z-index: -1;
    width: 0%;
    margin: auto;
    border-bottom: 3px solid #42484c;
    bottom: -10px;
    transition: all 1s;
    width: 100%;
    border-bottom-width: 3px;
}

  • +1 1

Share this post


Link to post
Share on other sites
27 минут назад, Papasan4ez сказал:

.product-layout .image:hover+div h4 a{
    transition: 0.4s;
    text-shadow: 1px 1px 11px #717171;
}
.product-layout .image:hover+div h4 a:after {
    content: "";
    display: block;
    position: relative;
    z-index: -1;
    width: 0%;
    margin: auto;
    border-bottom: 3px solid #42484c;
    bottom: -10px;
    transition: all 1s;
    width: 100%;
    border-bottom-width: 3px;
}

 

Спасибо за помощь, ваш ответ был лучший!)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.