Advertisement
AngelLIves

Web Design

Nov 6th, 2018
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.54 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.   <meta charset="utf-8">
  5.   <title>Батарейка, Соц-сети, Индикатор выполнения</title>
  6.   <style>
  7.     /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  8.  
  9.     /*             Батарейки                 */
  10.  
  11.     /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  12.  
  13.    .b {
  14.      width: 150px;
  15.      height: 50px;
  16.      border: 4px solid #000;
  17.      margin-bottom: 10px;
  18.      position: relative;
  19.    }
  20.  
  21.    .b::before,
  22.    .b::after {
  23.      content: '';
  24.      position: absolute;
  25.    }
  26.  
  27.    .b::after {
  28.      width: 10px;
  29.      height: 20px;
  30.      background: #000;
  31.      right: -10px;
  32.      top: 15px;
  33.    }
  34.  
  35.    .b::before {
  36.      height: 100%;
  37.    }
  38.  
  39.    .low::before {
  40.      width: 100%;
  41.      background: #00A055;
  42.    }
  43.  
  44.    .medium::before {
  45.      width: 65%;
  46.      background: #FFC60B;
  47.    }
  48.  
  49.    .high::before {
  50.      width: 30%;
  51.      background: #ED1C24;
  52.    }
  53.  
  54.    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  55.  
  56.    /*             Социальные сети                 */
  57.  
  58.    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  59.  
  60.   * {
  61.   margin: 0;
  62.   padding: 0;
  63. }
  64.  
  65. .pers1 {
  66.   background: url(http://htmlbook.ru/files/person1.jpg) no-repeat;
  67. }
  68. .pers2{
  69.   background: url(http://htmlbook.ru/files/person2.jpg) no-repeat;
  70. }
  71. .pers3 {
  72.   background: url(http://htmlbook.ru/files/person3.jpg) no-repeat;
  73. }
  74. .pers1, .pers2, .pers3  {
  75.   display: inline-block;
  76.   width: 140px;
  77.   height: 140px;
  78.   margin: 20px 20px;
  79.   border-radius: 50%;
  80.   border: 3px solid lightgrey;
  81.   position: relative;
  82.   background-size: contain;
  83. }
  84. .vk, .tw, .faceb, .mess {
  85.   width: 30px;
  86.   height: 30px;
  87.   border-radius: 50%;
  88.   background: url(http://htmlbook.ru/files/social_icons.png) no-repeat;
  89.   position: absolute;
  90.  
  91. }
  92. .vk {
  93.   left: 10px;
  94.   top: 0;
  95.   background-position: -60px -30px;
  96.  
  97. }
  98. .tw {
  99.   left: -10px;
  100.   top: 30px;
  101.   background-position: -30px -30px;
  102. }
  103. .faceb {
  104.   left: -15px;
  105.   top: 65px;
  106.   background-position: 0px -30px;
  107. }
  108. .mess {
  109.   left: calc(50% - 15px);
  110.   bottom: -15px;
  111.   background-position: -90px -30px;
  112. }
  113. .pers2 .tw, .pers2 .faceb {
  114.   display: none;
  115. }
  116. .pers3 .tw {
  117.   display: none;
  118. }
  119. .vk:hover {
  120.   background-position: -60px 0px;
  121. }
  122. .tw:hover {
  123.   background-position: -30px 0px;
  124. }
  125. .faceb:hover {
  126.   background-position: 0px 0px;
  127. }
  128. .mess:hover {
  129.   background-position: -90px 0px;
  130. }
  131.  
  132.    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  133.  
  134.    /*             Индикатор выполнения                  */
  135.  
  136.    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  137.  
  138.    #indicator {
  139.   width: 250px;
  140.   border: 1px solid #333;
  141.   position: relative;
  142.   background: #fff;
  143. }
  144.  
  145. #indicator .half {
  146.   background: #f2f0e3;
  147.   position: absolute;
  148.   height: 100%;
  149.   width: 50%;
  150. }
  151.  
  152. #indicator .begin,
  153. #indicator .end {
  154.   position: absolute;
  155.   font-size: 0.9em;
  156.   top: 1px;
  157. }
  158.  
  159. #indicator .begin {
  160.   padding-left: 3px;
  161. }
  162.  
  163. #indicator .end {
  164.   right: 0;
  165.   padding-right: 3px;
  166. }
  167.  
  168. #indicator .current {
  169.   position: relative;
  170.   text-align: center;
  171. }
  172.  
  173.   </style>
  174. </head>
  175.  
  176. <body>
  177.   <div class="b low"></div>
  178.   <div class="b medium"></div>
  179.   <div class="b high"></div>
  180.  
  181.   <div class="pers1">
  182.   <a href="http://www.vk.com/" target="_blank" title="ВКонтакте" class="vk"></a>
  183.   <a href="http://www.twitter.com/" target="_blank" title="Твиттер" class="tw"></a>
  184.   <a href="http://www.facebook.com/" target="_blank" title="Фейсбук" class="faceb"></a>
  185.   <a href="http://www.gmail.com/" target="_blank" title="Сообщения" class="mess"></a>
  186. </div>
  187. <div class="pers2">
  188.   <a href="http://www.vk.com/" target="_blank" title="ВКонтакте" class="vk"></a>
  189.   <a href="http://www.twitter.com/" target="_blank" title="Твиттер" class="tw"></a>
  190.   <a href="http://www.facebook.com/" target="_blank" title="Фейсбук" class="faceb"></a>
  191.   <a href="http://www.gmail.com/" target="_blank" title="Сообщения" class="mess"></a>
  192. </div>
  193. <div class="pers3">
  194.   <a href="http://www.vk.com/" target="_blank" title="ВКонтакте" class="vk"></a>
  195.   <a href="http://www.twitter.com/" target="_blank" title="Твитер" class="tw"></a>
  196.   <a href="http://www.facebook.com/" target="_blank" title="Фейсбук" class="faceb"></a>
  197.   <a href="http://www.gmail.com/" target="_blank" title="Сообщения"  class="mess"></a>
  198. </div>
  199.  
  200.   <div id="indicator">
  201.   <div class="half"></div>
  202.   <span class="begin">0</span>
  203.   <span class="end">100</span>
  204.   <div class="current">50%</div>
  205. </body>
  206. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement