SwiftBin

Untitled

Jul 26th, 2020 (edited)
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.75 KB | None | 0 0
  1.            
  2.             h1#correct {
  3.                 font-size: 21px;
  4.                 padding-left: 10px;
  5.             }
  6.            
  7.             h1#wrong {
  8.                 font-size: 21px;
  9.                 padding-left: 10px;
  10.             }
  11.  
  12.             /* custom radio button, without <input> */
  13.             .radio {
  14.                 width: 22px;
  15.                 height: 22px;
  16.                 border-radius: 50%;
  17.                 border: 1px #AAA solid;
  18.                 float: left;
  19.                 margin: 0px 15px 5px 10px;
  20.             }
  21.            
  22.             /* one answer div-container */
  23.             .answer {
  24.                 clear: both;
  25.                 margin-bottom: 16px;
  26.                 position: relative;
  27.                 overflow: hidden;
  28.             }
  29.            
  30.             /* margin between answers */
  31.             .answer:not(:first-child) {
  32.                 margin-top: 15px;
  33.             }
  34.            
  35.             /* invisible border to compensate height and width of the green/red circles */
  36.             .answer.correct .radio, .answer.wrong .radio {
  37.                 border: 1px rgba(0,0,0,0) solid;
  38.             }
  39.            
  40.             /* correct/green answer */
  41.             .answer.correct .radio {
  42.                 background: #548818;
  43.             }
  44.            
  45.             .answer.correct .radio:after {
  46.                 content: '✔';
  47.                 text-align: center;
  48.                 font-size: 13px;
  49.                 position: relative;
  50.                 left: 6px;
  51.                 top: 3px;
  52.             }
  53.  
  54.             /* wrong/red answer */
  55.             .answer.wrong .radio {
  56.                 background: #CF3434;
  57.             }
  58.            
  59.             .answer.wrong .radio:after {
  60.                 content: '×';
  61.                 position: absolute;
  62.                 font-size: 22px;
  63.                 position: relative;
  64.                 left: 5px;
  65.             }
  66.                        
  67.             /* answer text, compensate for Y offset in radio button placement */           
  68.             .answer .title {
  69.                 font-size: 18px;
  70.                 font-weight: 100;
  71.                 position: relative;
  72.                 top: 3px;
  73.             }
  74.            
  75.             /* unselected answers are drawn with gray font, but stay white when selected */        
  76.             .answer .title { color #999; }
  77.             #answers.answered .answer.correct .title, #answers.answered .answer.wrong .title { color: white; }
  78.             #answers:not(.answered) .answer .title { color: white; }
  79.            
Add Comment
Please, Sign In to add comment