模拟商城点击加入商品对比效果
模拟商城点击加入商品对比效果
新建html文档。
准备好需要用到的图标。
书写hmtl代码。
书写css代码。
body, form, img { padding: 0px; margin: 0px; border: 0px; font-size: 12px; font-family: "", Arial; line-height: 18px; }
body { background: #696866; }
dl, dd, dt, ul, ol, li, h1, h2, h3, h4, h5, h6 { list-style-position: outside; list-style-type: none; margin: 0px; padding: 0px; border: 0px; }
a:link, a:visited { text-decoration: none; color: #000; }
a:active, a:hover { text-decoration: underline; color: #ff6600; }
input[type=radio], input[type=checkbox] { cursor: pointer; }
.clear { clear: both; font-size: 0px; visibility: hidden; width: 0px; line-height: 0px }
.jd, .jd dd, .jd dt, .jd li { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.centess { margin: 0 auto; width: 728px; background: #fff; }
.ttop i, .ttop p, .ttop b, .ttop s, .ttop u, .ttop span { display: block; border: 0px; padding: 0px; margin: 0px; font-weight: normal; font-variant: normal; float: left; }
.ttop u { padding-right: 20px; }
.ttop p { padding-top: 10px; }
.ttop b { float: right; padding-right: 10px; padding-top: 10px; }
.ttop i { float: right; padding: 10px 30px 0 0; }
.ttop span { float: right; padding: 10px 10px 0 0; width: 200px; }
.searchtxt { border: 1px solid #cdcdcd; color: #cdcdcd; line-height: 14px; width: 200px; height: 14px; float: right; }
#bnav { clear: both; width: 986px; height: 13px; padding: 8px 0 5px 0; background: #333; border-bottom: 1px solid #555; text-align: center; color: #a9a9a9; margin: 0 auto; line-height: 13px; }
#bnav a { color: #a9a9a9; text-decoration: none; margin: 0 12px 0 13px; }
#bnav a:hover { color: #f00; text-decoration: underline; }
#bback { width: 986px; height: 16px; padding-top: 3px; height: 23px; background: #444; text-align: center; margin: 0 auto; }
#bback input { font-size: 12px; line-height: 14px; }
#copy a { color: #fff; }
书写并添加js代码。
代码整体结构。
查看效果。
版权声明:本站【趣百科】文章素材来源于网络或者用户投稿,未经许可不得用于商用,如转载保留本文链接:https://www.qubaik.com/answer/39347.html