Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. .green_guys + p {
  2. /* selects the <p> element that immediately follows .green_guys */
  3. }
  4.  
  5. .green_guys ~ p {
  6. /* selects all <p> elements that follow .green_guys */
  7. }
  8.  
  9. <input name="importantAnswer">
  10. <div class="help-text"></div>
  11. <div class="invalid-text"></div>
  12.  
  13. <input name="importantAnswer">
  14. <div class="messages">
  15. <div class="help-text"></div>
  16. <div class="invalid-text"></div>
  17. </div>
  18.  
  19.  
  20. .help-text, .invalid-text {
  21. visibility:hidden;
  22. }
  23.  
  24. .input:active +.messages > .help-text {
  25. visibility:visible;
  26. }
  27.  
  28. .input.invalid:visited +.messages > .invalid-text {
  29. visibility:visible;
  30. }
  31.  
  32. p ~ p:not(.green_guys),
  33. p:first-child:not(.green_guys) {
  34. text-decoration: line-through; /* or whatever you like */
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement