Tuesday 15 April 2014

CSS, Enable style on condition -


I am working on my website so that it can be displayed and almost the same thing can be done even if Javascript is disabled, therefore I have INPUT, Javascript enabled, TEXTAREA tags I can focus my mouse over INPUT and TEXTAREA style display: block to display: can not be any There is no way to check with CSS, the user focuses on the INPUT tag and then t Can you apply some style to the Xeta tag?, Thank you and have a good day.

You can use the impending selector in this way:

HTML:

  Click on text input & lt; Input type = "text" & gt; & Lt; Textarea name = "" id = "cols =" 30 "rows =" 10 "& gt; & Lt; / Textarea & gt;   

CSS

  input [type = text]: focus {border: 1px solid red; } Texture {display: none; } Input [type = text]: focus + texture {display: block; }   

Although you will see that you can not actually click and focus on texts when it appears.

No comments:

Post a Comment