Project based Learning using HTML CSS JS- Day 19

Project based Learning using HTML CSS JS- Day 19

·

1 min read

Today's day 19 Goal is to build a CSS hover me transition.

HTML

1. Create a heading.

  1. Write the following code.
<h1>hoverme</h1>

CSS

how to place contents to center?

body{
    display: grid;
    place-content: center;
}

how to display an object using pseudo element?

h1::before{
    content: "";
    display: block;
    background-color: rgb(93, 104, 231);
    height: 1em;
    width: 1em;
    position: absolute;
}

how to display object using hover element?

h1:hover::before{

JavaScript

-

Conclusion

  1. Place contents to center.

  2. Display an object using pseudo element.

  3. Display object using hover element.

My Code:

day 19 css hoverme 1.png

day 19 css hover me 2.png

Author: Dheeraj.y