Hello devs!👋 Today I'll be sharing a wonderful list design using HTML and CSS only 😍.
I am Aaditya, sharing some useful and interesting projects here. You can follow me on my Instagram handle @_foxstack_.
Preview of project:
So let's proceed towards it's development. First I have provided HTML and then CSS. I have also given CodePen link to make your task easier. 😀
HTML (index.html):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | <!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <title>CodePen - Claymorphism list hover effect</title> <link rel="stylesheet" href="./style.css"> </head> <body> <!-- partial:index.partial.html --> <div class="container"> <div class="list"> <h3>Popular Creators</h3> <div class="list-item"> <div class="rank"><span>1</span></div> <div class="name"> <h4>Sarah Brown</h4> <p>Digital Artist</p> </div> </div> <div class="list-item"> <div class="rank"><span>2</span></div> <div class="name"> <h4>Alex Jason</h4> <p>Musician</p> </div> </div> <div class="list-item"> <div class="rank"><span>3</span></div> <div class="name"> <h4>Natasha Wood</h4> <p>Film Maker</p> </div> </div> <div class="list-item"> <div class="rank"><span>4</span></div> <div class="name"> <h4>Isa Zoe</h4> <p>UI/UX Designer</p> </div> </div> <div class="list-item"> <div class="rank"><span>5</span></div> <div class="name"> <h4>Ali Mohammad</h4> <p>Director</p> </div> </div> <div class="list-item"> <div class="rank"><span>6</span></div> <div class="name"> <h4>Noah Shi</h4> <p>Architecture</p> </div> </div> </div> </div> <!-- partial --> </body> </html> |
CSS (style.css):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600;700;800;900&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; } .container { width: 100%; min-height: 100vh; display: flex; justify-content: center; align-items: center; background: #2f363e; } .list { position: relative; width: 350px; min-height: 500px; padding: 50px; background: #2f363e; box-shadow: 25px 25px 75px rgba(0, 0, 0, 0.25), 10px 10px 70px rgba(0, 0, 0, 0.25), inset 5px 5px 10px rgba(0, 0, 0, 0.5), inset 5px 5px 20px rgba(255, 255, 255, 0.2), inset -5px -5px 15px rgba(0, 0, 0, 0.75); border-radius: 30px; } .list h3 { color: #fff; font-size: 1.2rem; font-weight: 700; } .list-item { position: relative; display: flex; align-items: center; margin: 20px 0; cursor: pointer; } .list-item::before { content: ''; position: absolute; top: 0; left: 0; width: 45px; height: 45px; background: #1f83f2; border-radius: 22.5px; box-shadow: 5px 5px 7px rgba(0, 0, 0, 0.25), inset 2px 2px 5px rgba(255, 255, 255, 0.5), inset -3px -3px 5px rgba(0, 0, 0, 0.5); transition: 0.5s; } .list-item:hover::before { width: 100%; } .list-item .rank { position: relative; min-width: 45px; height: 45px; display: flex; justify-content: center; align-items: center; border-radius: 50%; margin-right: 10px; } .list-item .rank::before { content: ''; position: absolute; width: 30px; height: 30px; background: #2f363e; border-radius: 30px; transform: scale(0); transition: 0.5s; } .list-item:hover .rank::before { transform: scale(1); } .list-item .rank span { position: relative; font-size: 1rem; font-weight: 600; color: #fff; transition: 0.5s; } .list-item .name { position: relative; line-height: 1.15rem; } .list-item .name h4 { font-weight: 600; color: #bcbcc0; transition: 0.5s; } .list-item .name p { font-size: 0.8rem; font-weight: 400; color: #95999d; transition: 0.5s; } .list-item:hover .name h4, .list-item:hover .name p { color: #fff; } |
License:
-------------------------------------------------------------------------------------------
The MIT License (MIT)
Copyright (c) 2022 by Morteza (https://codepen.io/mortezasharifinia/pen/PoQNXda)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
------------------------------------------------------------------------------------------------