是否有CSS选择器来检测输入是否选择了文本文件? [英] Is there a CSS selector to detect if an input has a text file selected?

查看:114
本文介绍了是否有CSS选择器来检测输入是否选择了文本文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试输入一些文件,并且仅在上一个文件已填满时才显示它们.这也可以使用CSS 3.

I'm trying to have some file inputs, and have them only show up if the previous one has been filled. This can use css 3 as well.

推荐答案

一个包含数千个单词的示例:一次显示一个X输入

An example worth thousands words: Display X input, one at a time

这个想法很简单,如果所需的输入集为空,则无效.从那里开始,您所要做的就是根据需要设置所有输入,并使用:invalid伪类.与标签一起使用也应该很好.

The idea is simple, if an input set as required is empty, it's invalid. From there, all you have to do is set all input as required and use the :invalid pseudo class. Should work great with label too.

这篇关于是否有CSS选择器来检测输入是否选择了文本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆