0

how to achieve this kind of effect(Stripes) when the input is empty.

enter image description here

MahmouD Skafi
  • 370
  • 3
  • 15
  • 1
    this may help you: https://stackoverflow.com/questions/37990812/css-background-stripes-on-div – Minal Chauhan Feb 04 '21 at 10:26
  • As far as applying the style only when empty, look at the [:placeholder-shown](https://developer.mozilla.org/en-US/docs/Web/CSS/:placeholder-shown) CSS pseudoclass. [Browser support info](https://caniuse.com/css-placeholder-shown). – Perette Feb 04 '21 at 10:42
  • related: https://stackoverflow.com/a/65506820/8620333 – Temani Afif Feb 04 '21 at 10:44
  • you could use the attribute `required` for the input and style `input:invalid` – Fabrizio Calderan Feb 04 '21 at 10:48
  • Does this answer your question? [Display lines instead of empty cells in html table](https://stackoverflow.com/questions/65506755/display-lines-instead-of-empty-cells-in-html-table) – Roy Mar 02 '21 at 11:20

0 Answers0