使用uni-form后出现神秘怪异的线条
我正在使用 django-uni-form 来显示表单。我已经在页面中包含了所有 css 和 javascript(尤其是 jquery)。但现在我看到一些奇怪的线条。下图显示了它的外观:
http://i243.photobucket.com /albums/ff176/cwalkrox/uni-form1.jpg
您可以注意到,对于用户名和电子邮件地址,线条与文本输入的上侧对齐,而对于两个密码,线条位于密码输入的下方。在uni-form的官方网站上,我在3个示例中看不到任何一行。即使它给了我一些台词,它应该保持一致吗?
所以奇怪的故事并没有就此结束。 jquery 可以突出显示所选的输入。但它突出显示用户名、电子邮件和密码的方式仍然不一致。下面的图片证明了这一点:
i243.photobucket.com/albums/ff176/cwalkrox/uni-form2.jpg
i243.photobucket.com/albums/ff176/cwalkrox/uni-form3.jpg
所以每个问题似乎都源于神秘的线条。那么这是怎么发生的呢?
顺便说一句,我向您展示的页面是以 django-registration 的形式呈现的。渲染片段为:
<form action="" method="post" class="uniForm">
<fieldset>
{{ form|as_uni_form }}
</fieldset>
</form>
I'm using django-uni-form to display forms. I've included all the css and javascript (notably jquery) in the page. But now I get some weird looking lines. The image below show how it looks:
http://i243.photobucket.com/albums/ff176/cwalkrox/uni-form1.jpg
You can notice that for username and email address, the lines are aligned with the upper side of text inputs while for two passwords, the lines are below the password inputs. In uni-form's official website, I can't see any line in the 3 examples. Even if it gives me some lines, should it be consistent?
So the strange story doesn't stop here. The jquery can highlight the selected inputs. But the ways it highlights username, email and password are still inconsistent. The following images prove it:
i243.photobucket.com/albums/ff176/cwalkrox/uni-form2.jpg
i243.photobucket.com/albums/ff176/cwalkrox/uni-form3.jpg
So every problems seem to stem from the mysterious lines. So how this happens?
BTW, the page I show you is rendered with the form of django-registration. The rendering snippet is:
<form action="" method="post" class="uniForm">
<fieldset>
{{ form|as_uni_form }}
</fieldset>
</form>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些行是由于 django-uniform 中包含的 css 文件造成的:uni-form.css、uni-form-generic.css 和 uni-form.jquery.css。
这看起来很奇怪,但至少在我的例子(pinax 项目)中,如果没有提供 css,表单看起来会更好。
我的 2 美分
Those lines are due to the css files included in django-uniform: uni-form.css, uni-form-generic.css and uni-form.jquery.css.
It seems weird but at least in my case (a pinax project) the forms look better without the provided css.
my 2 cents