博客列表 >4月2日作业—read()使用方式与简写

4月2日作业—read()使用方式与简写

黑猫警长的博客
黑猫警长的博客原创
2018年04月08日 17:25:44780浏览

实例

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes">
	<title>祈福供香,孩子平安吉祥!</title>
	<style type="text/css">
		*{ margin:0;padding: 0; font-weight: normal;}
		a{ text-decoration: none; }
		body{ font-size:14px;font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;}
		header{height: 250px; overflow: hidden; }
		.top{ background:#d75847; height: 70px;border-bottom-left-radius: 50%; border-bottom-right-radius: 50%; text-align: center;}
		.top span{ width: 80px; margin:0 auto; display: block; }
		.top span img{ width: 100%;height: 100%; border-radius: 50%; margin-top:40px; }
		.top h2{color: #393939; margin: 30px 0 10px 0px;}
		.top p{ color: #808080 }

		.content{ width: 90%; margin: 0 auto; overflow: hidden; text-align: center;padding-top: 10px; border-top:1px solid #f5f5f5;}
		
		.test { float: left; display: block; width:25%;padding:7% 0; border:2px solid #d75644;margin-left:6%;margin-bottom: 5%; color: #d75644; border-radius: 5px;}
		.content ul li:hover{ background: #d75644; cursor: pointer; color: #fff;}
		.content ul li:nth-child(3) ~ *{ margin-bottom: 0;}
		.content ul li em{ font-size: 25px; padding:0 10px; }
		.other{ text-align: center; padding:20px 0 0 0;}
		footer{ text-align: center; margin:10% 0 0 0; }
		footer p {margin-top:10px;color: #cdcdcd}
	</style>
	<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
	<script type="text/javascript">
		// $(document).ready(function () {
		// 	$('#test li').addClass('test')
		// })
		//简写jq代码
		$(function(){
			$('#test li').addClass('test')
		})
	</script>

</head>

<body>
	<header>
		<div class="top">
			<span><img src="http://43d.cc/front/0401/images/fozu.jpg"></span>
			<h2>随喜支持</h2>
			<p>祈福供香,孩子平安吉祥!</p>
		</div>
	</header>
	<div class="content">
		<ul id="test">
			<li><em>8</em></li>
			<li><em>66</em></li>
			<li><em>88</em></li>
			<li><em>168</em></li>
			<li><em>518</em></li>
			<li><em>888</em></li>
		</ul>
	</div>
	<div class="other">其他金额</div>
	<footer>
		<p>赞赏是为了表示鼓励对平台的无偿赠与</p>
	</footer>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

QQ截图20180408172519.png

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议