案例的知识点主要3个方面,一个是html5的结构,一个是CSS3样式,一个是页面居中的定位。
1.html5中的属性(placeholder)实现文本框的提示信息,required属性设置文本框信息是必填的。
2. CSS3的属性线性渐变(linear-gradient)实现页面(body)区域的背景色。
3.通过绝对定位(position:absolute)和CSS3中的变形(transform)实现div的页面居中定位。
案例的效果如下:
网页login.html的代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="css/page.css"/>
</head>
<body>
<div class="login1">
<h1>后台管理登陆</h1>
<div>
<form>
<p>
<input type="text" placeholder="请输入登录帐号" required="required"/>
</p>
<p>
<input type="password" placeholder="请输入登录密码" required="required"/>
</p>
<p>
<button type="submit">登陆</button>
</p>
</form>
</div>
</div>
</body>
</html>
外部样式文件page.css的代码如下:
说明:在外部样式(page.css)中,类(.login1)控制的div定位如果还不太理解的话,请参看下面的图示。
至此,案例制作完成。
app 内嵌H5页面,个人中心页面模板,包含 列表 按钮 图片 icon 搜索 布局 上传 对话框 。
手机演示地址:http://www.17sucai.com/preview/10221/2017-01-20/ceshi/index.html — my-read.html — my-secure.html — my-put.html — my-up.html
手机演示地址:http://www.17sucai.com/pins/demoshow/22887
手机版大气信息管理系统界面模板
手机演示地址:http://www.17sucai.com/pins/demoshow/22475
蓝色的手机登录模板
手机演示地址:http://www.17sucai.com/pins/demoshow/22480
苹果风格
手机演示地址:http://www.17sucai.com/pins/demoshow/20946
*请认真填写需求信息,我们会在24小时内与您取得联系。