当我试图用css添加一些输入字段时
我遇到了问题
对于某些输入字段,我无法生成多个css
这是我的领域
<input type="text" name="firstName" />
<input type="text" name="lastName" />
Run Code Online (Sandbox Code Playgroud)
而css是
input
{
background-image:url('images/fieldBG.gif');
background-repeat:repeat-x;
border: 0px solid;
height:25px;
width:235px;
}
Run Code Online (Sandbox Code Playgroud)
我想用这个css创建第一个字段(firstName)
input
{
background-image:url('images/fieldBG.gif');
background-repeat:repeat-x;
border: 0px solid;
height:25px;
width:235px;
}
Run Code Online (Sandbox Code Playgroud)
和这个css的第二个(lastName)
input
{
background-image:url('images/fieldBG2222.gif');
background-repeat:repeat-x;
border: 0px solid;
height:25px;
width:125px;
}
Run Code Online (Sandbox Code Playgroud)
请帮忙 :-)
我正在使用bootstrap 3中的modal,它包含在输入字段中
当加载页面时(不是通过单击按钮),使用jquery代码启动此模式
$().ready(function()
{
$('#OTPModal').modal('show');
});
Run Code Online (Sandbox Code Playgroud)
一旦显示模态,我就会通过此代码使输入成为焦点
$('#OTPModal').on('shown.bs.modal', function ()
{
$('#OTPField').focus();
});
Run Code Online (Sandbox Code Playgroud)
这段代码在谷歌浏览器中运行良好,但它不在Firefox中!
用chrome和firefox检查jsFiddle以查看不同的内容
https://jsfiddle.net/aq9Laaew/272015/
firefox版本:63.0.1(64位)
chrome版本:版本70.0.3538.77(官方版本)(64位)
javascript firefox google-chrome bootstrap-modal twitter-bootstrap-3