ACCP 8.0 jQuery 第八章 上机练习

这篇博客详细介绍了ACCP 8.0 jQuery课程的四个上机练习,包括对应的CSS样式和HTML结构。通过这些练习,读者可以深入理解jQuery在实际网页开发中的应用。
摘要由CSDN通过智能技术生成

上机练习1:

CSS:

*{

    margin:0px;

    padding:0px;

    font-size:12px;

}

#pruduce{

    width:947px;

    background-color:#F2F2F2;

}

.top{

    height:55px;

    background:url(../images/top.jpg) no-repeat 10px 10px;

}

.main{

    text-align:center;

    height:309px;

}

.box{

    width:300px;

    height:285px;

    border:1px solid #999;

    margin:0px 6px;

    float:left;

    cursor:pointer;

}

dl{

    padding-top:3px;



}

dd{

    line-height:30px;

}



div.btprice_1{

    height:50px;

    background:#FFF2CE url(../images/bt1.jpg) no-repeat 5px 4px;

}

div.btprice_2{

    height:50px;

    background:#FFF2CE url(../images/bt2.jpg) no-repeat 5px 4px;

}

div.btprice_3{

    height:50px;

    background:#FFF2CE url(../images/bt3.jpg) no-repeat 5px 4px;

}

.hoverstyle{

    background-color:#D51938;

    color:#fff;

}

HTML:

<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
<title>今日团购模块 </title>
	<link rel="stylesheet" href="css/shopping.css">
</head>
<body>
<div id="pruduce">
	<div class="top"></div>
    <div class="main">
    	<div class="box">
        	<dl>
            	<dt><img src="images/pic1.jpg" /></dt>
                <dd>[包邮]亮点可移动儿童防身高帖(每个ID限20)</dd>
                
            </dl> 
            <div class="btprice_1"></div>
        </div>
        <div class="box">
        	<dl>
            	<dt><img src="images/pic2.jpg" /></dt>
                <dd>[包邮]韩国泡温泉游泳衣价达玛分教保守纤瘦大胸泳装</dd> 
            </dl> 
             <div class="btprice_2"></div>
        </div>
        <div class="box">
        	<dl>
            	<dt><img src="images/pic3.jpg" /></dt>
                <dd>[包邮]贵人鸟运动透气跑鞋P23423(每个限购5件)</dd>
               
            </dl> 
             <div class="btprice_3"></div>
        </div>
    </div> 
</div>
</body>
<script src="js/jquery-1.12.4.js"></script>
<script>
    $(function(){
        $(".box dl").hover(function(){
            $(this).addClass("hoverstyle");
        },
        function(){
            $(this).removeClass("hoverstyle");
        }
        )
    })
</script>
</html>

上机练习2:

CSS:

* {
    margin: 0;
    padding: 0;
    line-height: 22px;
    font-family: "Arial", "微软雅黑";
}

#chat {
    margin: 3px auto 0 auto;
    width: 436px;
    border: 1px #999999 solid;
}

.chatBody {
    width: 100%;
    height: 220px;
    overflow: auto;
}

.chatText {
    border: none;
    width: 100%;
    height: 50px;
}

.btn {
    text-align: right;
}

.btn span {
    display: inline-block;
    padding: 0 10px;
    height: 25px;
    overflow: hidden;
    color: #ffffff;
    border-radius: 5px;
    background-color: #069dd5;
    font-size: 12px;
    margin-right: 3px;
    cursor: pointer;
}

.a {
    word-break: break-all;
    background-color: darkgray;
    border-radius: 5px;
}

HTML:

<!DOCTYPE html>
<html>

<head lang="en">
    <meta charset="U
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值