浏览器中的多个焦点元素
是否可以让多个元素(例如输入元素)集中在浏览器中。
我想重现Sublime Text 2的效果。
Is it possible to have multiple elements (such as input elements) focused in the browser.
I would like to reproduce the effect of Sublime Text 2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来不可能。
查看此测试:
示例: http://jsfiddle.net/jasongennaro/epBea/
编辑
如果您希望两个字段看起来都具有焦点,您可以通过在
周围添加
并在div
来伪造这一点输入焦点
上使用边框
进行样式设置。您还需要删除 css 中每个输入的
outline
。示例2: http://jsfiddle.net/jasongennaro/epBea/1/
警告:我认为这是一个糟糕的可用性想法,因为焦点意味着告诉人们他们正在从事哪个领域。
It doesn't seem possible.
Check out this test:
Example: http://jsfiddle.net/jasongennaro/epBea/
EDIT
If you wanted both fields to look like they had focus, you could fake this by adding
divs
around theinputs
and styling with aborder
onfocus
.You also need to remove the
outline
for each input in the css.Example 2: http://jsfiddle.net/jasongennaro/epBea/1/
Warning: I think this is a bad usability idea, as focus is meant to tell people which field they are working in.