Created
November 1, 2017 16:02
-
-
Save alexeyten/3e5dfb0d7f9ad31880ccf6286de2a7ee to your computer and use it in GitHub Desktop.
Notification Counter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Notification Counter | |
*/ | |
div { | |
width: 150px; | |
height: 150px; | |
background: #fea; | |
border-radius: 50%; | |
margin: 10px; | |
position: relative; | |
border: 2px solid #ed8; | |
} | |
.small { | |
width: 80px; | |
height: 80px; | |
} | |
.big { | |
width: 240px; | |
height: 240px; | |
} | |
span { | |
background: #aef; | |
position: absolute; | |
width: 2em; | |
height: 2em; | |
line-height: 2em; | |
top: 14%; /* Вот и вся магия */ | |
left: 14%; | |
margin: -1em; | |
border-radius: 50%; | |
border: 1px solid #99c; | |
text-align: center; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="small"> | |
<span>1</span> | |
</div> | |
<div> | |
<span>8</span> | |
</div> | |
<div class="big"> | |
<span>22</span> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split-vertical","fontsize":"90","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment