diff --git a/Profile Hovering/image.webp b/Profile Hovering/image.webp new file mode 100644 index 0000000..62d6c18 Binary files /dev/null and b/Profile Hovering/image.webp differ diff --git a/Profile Hovering/index.html b/Profile Hovering/index.html new file mode 100644 index 0000000..0ae38f3 --- /dev/null +++ b/Profile Hovering/index.html @@ -0,0 +1,25 @@ + + + + + Profile Card + + + + + +
+
+ profile pic +
+
+

Profile Card

+

Web Designer | Influencer

+ + +
+
+ + diff --git a/Profile Hovering/style.css b/Profile Hovering/style.css new file mode 100644 index 0000000..557ddad --- /dev/null +++ b/Profile Hovering/style.css @@ -0,0 +1,98 @@ +/* Filename:style.css */ +@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@700&display=swap"); + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + height: 100vh; + background: rgb(90, 8, 2); + display: flex; + justify-content: center; + align-items: center; + font-family: 'Merriweather', serif; +} + +/* Profile card making starts here */ +.card { + width: 320px; + height: 400px; + background-color: white; + border-radius: 8px; + position: relative; +} + +/* Contains the image */ +.img-box { + position: absolute; + top: 10px; + bottom: 10px; + right: 10px; + left: 10px; + background-color: white; + transition: 0.5s; + z-index: 2; + +} + +/* The image dimensions changes on hover and the +underlaying information shows up*/ +.card:hover .img-box { + top: 10px; + bottom: 125px; + right: 10px; + left: 10px; +} + +/* Image radius changes on hover*/ +.card:hover img { + border-radius: 10px; +} + +/* The image */ +img { + width: 100%; + height: 100%; + position: absolute; + object-fit: cover; +} + +/* Contains the name, designation and a button to contact */ +.info { + position: absolute; + bottom: 40px; + right: 10px; + left: 10px; + text-align: center; + height: 80px; +} + +/* Style the name*/ +h2 { + font-weight: bold; + color: rgb(51, 50, 50); +} + +/* Style the paragraph which contains the designation */ +p { + color: rgb(197, 74, 111); +} + +/* The button to contact */ +button { + position: absolute; + background-color: rgb(122, 14, 10); + border: none; + border-radius: 10px; + text-align: center; + left: 75px; + margin: 8px; + font-size: 20px; + padding: 10px 15px; + color: wheat; + font-family: 'Merriweather', serif; + cursor: pointer; +}