Home  >  Article  >  Web Front-end  >  如何在登录页面的图片中精确放置输入框?_html/css_WEB-ITnose

如何在登录页面的图片中精确放置输入框?_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:51:241933browse

如下图的登录图片,图中预留了用户名、密码、确定按钮等位置,请问如何把我的户名、密码输入框精确放到图片的位置中?如果图片在各种分辨率的显示下居中的话,户名、密码输入框的left位置应该是不一样的吧,如何兼容各种分辨率呢?请各位高人指教!


回复讨论(解决方案)

先把大图的的DIV的css设置为position:relative,再用position:absolute定位一个DIV,最后就在这个DIV中写form表单就是了。

和分辩率也没啥关系吧! 
背景图片写在body里,background:url(xx.jpg) no-repeat center top
你内容容器,直接写宽度,然后margin:0 auto;这样不就一直在中间的么?

谢谢,我先来试试,试验成功就来结贴!

最要紧的是找块好图片

你可借助绘图工具farmework、photoshop都提供可页面生成功能,均可实现精确定位

这个问题以前碰到过

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn