CSS Tutorial For Beginners 20 - Hover, Active & Visited Effects

Поделиться
HTML-код
  • Опубликовано: 18 окт 2024

Комментарии • 28

  • @sandeepponnusamy7093
    @sandeepponnusamy7093 3 года назад +2

    Tutorials back 6 years
    & My friend suggested & I will never regret,it as it's worth much till date🙏

  • @briantoon4128
    @briantoon4128 6 лет назад +18

    I noticed that once you have visited the link, you no longer get the red hover effect unless you reorder the CSS file putting a:hover{ color: red } at the end

  • @ivanyosifov2629
    @ivanyosifov2629 5 лет назад +17

    Remember *LOVE HATE* (LVHA) - the correct order for link pseudoclasses
    a:link
    a:visited
    a:hover
    a:active

    • @GabrielBaltat
      @GabrielBaltat 4 года назад

      Thank you sir, it worked and it is easy to remember! :)

    • @perianka
      @perianka 4 года назад +1

      whats a:link?

    • @ivanyosifov2629
      @ivanyosifov2629 4 года назад +1

      @@perianka a:link targets normal links - not visited, not hovered, not focused

  • @sohupba7122
    @sohupba7122 2 месяца назад

    Your Tutorial is great, thanks buddy

  • @youarewelcome2009
    @youarewelcome2009 6 лет назад +7

    There is actually some important rules:
    a:hover MUST come after a:link and a:visited
    a:active MUST come after a:hover
    In my browser, it did not work otherwise.

    • @121siddhigada9
      @121siddhigada9 4 года назад

      thks for the help

    • @perianka
      @perianka 4 года назад

      cant you use for example hover withouth using the other ones?

    • @DamianSzajnowski
      @DamianSzajnowski Год назад

      Wonder if default browser styles created some conflict here

  • @Marsell88
    @Marsell88 5 лет назад +6

    Hi,
    is there a way you can set all attributes (link, visited, hover, active) for a single link element without making 4 different syntax blocks?

  • @intigonzalez2275
    @intigonzalez2275 6 лет назад +1

    Why is it that sometimes things are in front of the hover like: ul li a:hover img {...} instead of behind the hover - ul li a img:hover {...}
    ???

  • @weswes1119
    @weswes1119 8 лет назад +4

    how can I make font size increase hover effect without affecting other inline text?

    • @EricCartmanFTW
      @EricCartmanFTW 7 лет назад +2

      by creating another element nested within the tag, in this case a
      HTML:
      more smelly fish here
      this is the best place for smelly fish
      CSS:
      a:hover {
      font-size: 50px;
      }

  • @ismahenelarbi7386
    @ismahenelarbi7386 6 лет назад +1

    Hi,
    What if I wanted to change on image on hover ?
    thanks for the tuts :)

    • @whit3rose
      @whit3rose 4 года назад +2

      create a div and set background image using css. Now target the div and use hover selector and reassign the background image. You can't directly manipulate img tag's source. So this is the way.
      Shit, I'm 1 year late. You might already have figured it out. Sorry.

    • @Sri-wg3ne
      @Sri-wg3ne 3 года назад

      @@whit3rose background image using css? How?

  • @amritaacharjee3091
    @amritaacharjee3091 4 года назад +1

    Sir, why my css link is not connecting in html file? Kindly help me.

    • @perianka
      @perianka 4 года назад +1

      did you did all the

  • @joannehughes6082
    @joannehughes6082 2 года назад

    L,
    V,
    H,
    A
    (love and hate): link, visited, hover and active - else you'll override yourself

  • @Yeet-vv7qj
    @Yeet-vv7qj 4 года назад +1

    If i click on a link once (so it is visited and changes color) and then refresh the page, the link's color doesn't return to it's "a:link" state (unvisited). How can I avoid that?
    (An example of what I mean: ruclips.net/video/yfoY53QXEnI/видео.html
    Minute: 40:20)

    • @williamowen1575
      @williamowen1575 4 года назад +1

      I came here looking for an answer to this too....

    • @astronaut1751
      @astronaut1751 3 года назад +1

      same bro

    • @JhonatanJhanfrank
      @JhonatanJhanfrank 2 года назад

      @@williamowen1575 ¿lograste encontrar la solución a ese problema?