CodePen

HTML

            
              <div></div>

<input type="text">

<div>abc</div>

<input type="text" value="abc">
            
          
!

CSS

            
              :empty {
  border: 1px solid red; 
}

body {
  padding: 20px;
}
            
          
!

JS

            
              
            
          
!
999px
Loading ..................