Guest User

Untitled

a guest
Sep 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. /* code not necessary for the effect, just to make it pretty */
  2. html {
  3. background-color: #EEE;
  4. overflow-y: scroll;
  5. }
  6. body {
  7. color: #333;
  8. font-family: Verdana;
  9. font-size: 14px;
  10. margin: 0 auto;
  11. padding: 1em;
  12. max-width: 480px;
  13. }
  14. h1, h2 {
  15. color: #005700;
  16. font-size: 22px;
  17. margin: 0 auto;
  18. text-align: center;
  19. }
  20. h2 {
  21. font-size: 18px;
  22. font-weight: normal;
  23. margin-top: 1em;
  24. }
  25. ul {
  26. margin: 0 auto;
  27. padding: 0;
  28. }
  29. li {
  30. border-bottom: 1px dotted #CCC;
  31. list-style: none;
  32. margin: 1em 0;
  33. padding: 0 0 0.5em;
  34. }
  35. p {
  36. margin: 0;
  37. padding: 0;
  38. text-align: justify;
  39. text-indent: 1em;
  40. }
  41. label {
  42. color: #005700;
  43. font-size: 12px;
  44. font-style: italic;
  45. }
  46. label:hover, label:active {
  47. text-decoration: underline;
  48. }
  49. footer {
  50. font-size: 0.9em;
  51. font-variant: small-caps;
  52. margin: 3em 0 0;
  53. }
  54.  
  55. /* code necessary for the effect */
  56. p {
  57. overflow: hidden;
  58. text-overflow: ellipsis;
  59. white-space: nowrap;
  60. }
  61. input {
  62. display: none;
  63. }
  64. input ~ label {
  65. cursor: pointer;
  66. }
  67. input ~ label:after {
  68. content: "show more";
  69. }
  70. input:checked ~ p {
  71. white-space: normal;
  72. }
  73. input:checked ~ label:after {
  74. content: "show less";
  75. }
  76. input[type="radio"]:checked ~ label:after {
  77. content: "";
  78. }
Add Comment
Please, Sign In to add comment