简体   繁体   English

您如何在php中自定义登录字段以使网站类似于Facebook或其他流行的登录网站?

[英]How do you customize the login-fields in php to make a site similar to Facebook or other popular login sites?

For example, with the login I made with a php script, the login boxes (username and password) are blocky (I've seen rounded corners login-forms) and the spacings are uneven (one is above the other). 例如,使用php脚本进行登录时,登录框(用户名和密码)是块状的(我见过圆角的登录表单),并且间距不均匀(一个在另一个之上)。

Is there anyway to customize how login-boxes are designed and aligned in php, similar to how css is used at times (I'm not as familiar with css) or within php? 无论如何,是否可以自定义php中登录框的设计和对齐方式,类似于有时使用css(我不太熟悉css)或在php中使用css的方式?

http://img845.imageshack.us/i/facebooklogin.jpg vs. http://img577.imageshack.us/i/loginq.jpg/ http://img845.imageshack.us/i/facebooklogin.jpg与http://img577.imageshack.us/i/loginq.jpg/

CSS is the way to style this. CSS是样式设置的方式。 If you aren't comfortable doing it, try to find some CSS stylesheets that already exist to style forms. 如果你不舒服这样做,试图找到一个已经存在的风格形式的一些CSS样式表。

Alternatively, you can use javascript plugins like jQuery's uniform and call it on your inputs to style them automagically. 另外,您可以使用jQuery 制服之类的javascript插件,并在输入中调用它以自动设置样式。

Styling of any html form fields, regardless of how they're processed, should be done with CSS. 任何html表单字段的样式,无论如何处理,都应使用CSS进行。 It's not hard - there's a great tutorial/reference at w3schools . 这并不难-w3schools上有很棒的教程/参考资料。

In response to your specific question (rounded corners), you'd use the border-radius property: 为了回答您的特定问题(圆角),您可以使用border-radius属性:

    <style> 
    .rounded  {
        border: 1px solid black;
        -moz-border-radius: 10px;
        -webkit-border-radius: 10px;
    }
    </style> 

    <input type="text" class="rounded" name="username" /> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM