CSS selector for text input fields?

后端 未结 9 783
广开言路
广开言路 2020-12-07 07:46

How can I target input fields of type \'text\' using CSS selectors?

9条回答
  •  猫巷女王i
    2020-12-07 08:17

    You can use the attribute selector here:

    input[type="text"] {
        font-family: Arial, sans-serif;
    }
    

    This is supported in IE7 and above. You can use IE7.js to add support for this if you need to support IE6.

    See: http://reference.sitepoint.com/css/attributeselector for more information

提交回复
热议问题