Как прописать css для картинки при onmouseover

Discussion in 'CSS, HTML, Web 2.0, верстка по web-стандартам' started by sheridan, Mar 15, 2011.

  1. Offline

    sheridan Недавно здесь

    Joined:
    Mar 2, 2011
    Messages:
    23
    Likes Received:
    0
    Gender:
    Female
    С помощью onmouseover у меня сменяются 2 картинки при наведении мышью, но при этом всё прыгает=O, т.к.
    height верхней картинки - 165px, а нижней - 185px. Как прописать стиль для нижней картинки, которая появляется при onmouseover?
    <img onmouseover="this.src='images/stories/2.png';" onmouseout="this.src='images/stories/1.png';" src="images/stories/1.png" />
     
  2.  
  3. Offline

    TroL Недавно здесь => Cпециалист <=

    Joined:
    Mar 1, 2011
    Messages:
    501
    Likes Received:
    34
    Gender:
    Male
    Попробуй так:
    <img height="165px" onmouseover="this.src='images/stories/2.png';" onmouseout="this.src='images/stories/1.png';" src="images/stories/1.png" />
     
    sheridan likes this.
  4. Offline

    sheridan Недавно здесь

    Joined:
    Mar 2, 2011
    Messages:
    23
    Likes Received:
    0
    Gender:
    Female
    Помогло! :) Спасибо, TroL!
     

Share This Page

Loading...