UI设计

1.背景   background:color ,image(position、repeat、size、attachment、all-range),

background:#fff url('    ') [ top  left]   [repeat: no-repeat、cover、]   [attachment:fixed]

2.透明度   opacity:0.8

  filter:alpha(opcity=80)

3. input框缩进   padding-left:

  text-indent:

4.    outline:none;   小蓝框

  input:focus{ box-shadow:0 0 3px #000 inset;}

5.  伪类  :hover{    }

   a:hover   .bt1:hover

6.鼠标样式  cursor:pointer

7.html   css  结构层次合理  同一功能尽量使用统一样式  

8.min-width  min-height 

9.绝对定位  相对定位

10.流式页面

效果图:

代码如下:

<!DOCTYPE html>
<html>
<head>
<script src="../新项目/js/usual.js"></script>
  <meta charset="UTF-8">
  <title>UI图</title>
  <style>
  html,body{
    width:100%;
    height:100%
	}
	
   body{
	margin:0;
	padding:0;
	background-size: 100%;
   }
   .container{
   position:relative;
	width:100%;
	height:100%;
	background:#4589ae;
	background-image:url(../images/1019.jpg);
	background-repeat:no-repeat;
	background-size:cover;
   }
   .tu{
	width:30%;
	height:60%;
	text-align:center;
	position:absolute;
	opacity:0.9;
	filter:alpha(opacity=90);
	min-width:300px;
	min-height:400px;
	
   }
   .title{
	width:100%;
	height:15%;
	font-size:100%;
	font-weight:900;
	color:white;
	background-color:#4589ae;
   }
   
   .cont{
	width:100%;
	height:82%;
	font-size:100%;
	color:#649cf1;
	font-weight:900;
	background-color:white;
   }
   .cont input{
   text-indent:2%;
   margin:2% 0;
	width:80%;
	height:8%;
	outline:none;
	min-width:30px;
	min-height:14px;
	border:1px solid #649cf1;
   }
   .cont input:focus{ 
   box-shadow:0 0 3px 2px #649cf1 inset;
   }
   .cont button{
   height:8%;
	width:80%;
	background-color:#649cf1;
	border:none;
	
	outline:none;
	
   }
   .cont button:hover{
	cursor:pointer;
   }
   .bt_span{
	color:white;
	
	
   }
   
  </style>
</head>
<body>
  <div class="container">
    <div class="tu">
		<div class="title">
			<div style="width:100%;height:30%;"></div>
			<span>Please Enter Your New Password</span>
		</div>
		<div class="cont">
			<div style="width:100%;height:5%;"></div>
			<span>Your Account</span>
			<input />
			<div style="width:100%;height:13%;"></div>
			<span>New Password</span>
			<input  />
			<div style="width:100%;height:5%;"></div>
			<span>Confirm Your New Password</span>
			<input  />
			<div style="width:100%;height:5%;"></div>
			<button><span class="bt_span">Finish</span></button>
		</div>
	</div>
     
  </div>
  <script>
  
	
	$(document).ready(function(){
		
	
		var scwidth=$(window).width();
		var scheight=$(window).height();
		var scwidth1=$('.tu').width();
		var scheight1=$('.tu').height();
		
		var endwidth=(scwidth-scwidth1)/2;
		var endheight=(scheight-scheight1)/2;
			$('.tu').css({
                    
					'top':endheight+'px',
					'left':endwidth+'px'
                });
		
	});
	$(window).resize(function(){
		var scwidth=$(window).width();
		var scheight=$(window).height();
		var scwidth1=$('.tu').width();
		var scheight1=$('.tu').height();
		
		var endwidth=(scwidth-scwidth1)/2;
		var endheight=(scheight-scheight1)/2;
			$('.tu').css({
                    
					'top':endheight+'px',
					'left':endwidth+'px',
					
                });
				
	});
  </script>
</body>
</html>

 

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值