Advertisement
Slapoguzov

Untitled

Dec 7th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.36 KB | None | 0 0
  1. html, body{
  2.     margin:0;
  3.     padding:0;
  4. }
  5. body{
  6.     width:350px;
  7.     height:250px;
  8.     font-family:"Arial";
  9.     line-height:30px;
  10. }
  11. .two-cards div{
  12.     display:inline-block;
  13.     position:relative;
  14.     width:120px;
  15.     height:180px;
  16.     margin:10px;
  17.     margin-top:30px;
  18. }
  19. .ace-heart {
  20.     position: relative;
  21.     background: url(/assets/pcourse2/heart-ace.png) white 50% 50% no-repeat;
  22. }
  23.  
  24. .ace-heart:before {
  25.     content: "A";
  26.     position: absolute;
  27.     top: 5px;
  28.     left: 5px;
  29.     color: red;
  30.     font-weight: bold;
  31.     font-size: 25px;
  32.     background: url(/assets/pcourse2/heart-icon.png) white 50% 100% no-repeat;
  33.     height: 50px;
  34. }
  35. .ace-heart:after {
  36.     content: "A";
  37.     height: 50px;
  38.     position: absolute;
  39.     bottom: 5px;
  40.     right: 5px;
  41.     color: red;
  42.     font-weight: bold;
  43.     font-size: 25px;
  44.     background: url(/assets/pcourse2/heart-icon.png) white 50% 100% no-repeat;
  45. }
  46.  
  47. .two-spade {
  48.     position: relative;
  49.     background: url(/assets/pcourse2/spade-two.png) white 50% 50% no-repeat;
  50. }
  51.  
  52. .two-spade:before {
  53.     content: "2";
  54.     position: absolute;
  55.     top: 5px;
  56.     left: 5px;
  57.     color: black;
  58.     font-weight: bold;
  59.     font-size: 25px;
  60.     background: url(/assets/pcourse2/spade-icon.png) white 50% 100% no-repeat;
  61.     height: 50px;
  62. }
  63. .two-spade:after {
  64.     content: "2";
  65.     height: 50px;
  66.     position: absolute;
  67.     bottom: 5px;
  68.     right: 5px;
  69.     color: black;
  70.     font-weight: bold;
  71.     font-size: 25px;
  72.     background: url(/assets/pcourse2/spade-icon.png) white 50% 100% no-repeat;
  73. }
  74.  
  75. /* неочевидная деталь */
  76. .two-cards div:before, .two-cards div:after{
  77.     width: 20px;
  78. }
  79. /* автоматический поворот нижней иконки */
  80. .two-cards div:after {
  81.     -webkit-transform: rotate(180deg);
  82.     transform: rotate(180deg);
  83. }
  84.  
  85. /*
  86. Ссылки на изображения:
  87. /assets/pcourse2/heart-ace.png - большое изображение для червового туза
  88. /assets/pcourse2/heart-icon.png - маленькая иконка червовой масти
  89. /assets/pcourse2/spade-two.png - большое изображение для пиковой двойки
  90. /assets/pcourse2/spade-icon.png - маленькая иконка пиковой масти
  91.  
  92. Все значения указаны в пикселях и кратны 5
  93. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement