Search
 
SCRIPT & CODE EXAMPLE
 

CSS

add notification in css

html file:

<div class="my-element" notif="77" ></div>



css file:

.my-element {
    position: relative;
    width: 50px;
    height: 50px;
    border: 1px solid black;
    border-radius: 4px;
}

.my-element::before {
    content: attr(notif);
    position: absolute;
    top: -0.75em;
    right: -0.75em;
    width: 1.5em;
    height: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: red;
    color: white;
}
Comment

PREVIOUS NEXT
Code Example
Css :: media min height css 
Css :: horizontal scroll css images 
Css :: change svg color on hover, css 
Css :: span cursor pointer 
Css :: css media queries laptop 
Css :: how to make an image oval in css 
Css :: tailwind background gradient 
Css :: css disabled 
Css :: bottom gradient 
Css :: css remove white space below footer 
Css :: center absolute suedo element 
Css :: css comments 
Css :: css code for green 
Css :: Add border to text - Css 
Css :: bootstrap popover style width 
Css :: check ssh port 
Css :: list elements vertically in html 
Css :: css border-bottom only length of text 
Css :: using materialize css with react 
Css :: change image color in bootstrap card on hover css 
Css :: hr vertical en html 
Css :: webpack 5 compile scss to css file 
Css :: sass import 
Css :: CSS Modules cannot be imported from within node_modules. 
Css :: padding bottom and top css in same ligne 
Css :: css flexbox 
Css :: sass loader 
Css :: how to increase the area of a text are 
Css :: select first 5 child css 
Css :: target button of fileinput css 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =