Html
    Css
    Js

    
                        
* {
	margin:0;
	padding:0;
	list-style:none;
}
#app {
	width:1200px;
	height:600px;
	margin:auto;
}
.cart {
	margin-top:100px;
}
h1 {
	position:relative;
	margin:-20px auto;
	background:white;
	width:200px;
	letter-spacing:8px;
	text-align:center;
}
.title {
	margin-top:40px;
	height:53px;
	line-height:53px;
	background:#5d5d5d;
	color:white;
	display:flex;
	font-size:18px;
	font-weight:bolder;
}
.information {
	flex:5;
	text-align:center;
}
.single,.num,.total,.edit {
	flex:1;
	justify-content:center;
	align-items:center;
	display:flex;
}
.commodity {
	height:140px;
	padding-bottom:40px;
	display:flex;
}
.commodity ul {
	display:flex;
	width:100%;
	border-bottom:1px solid #aaaaaa;
	border-top:1px solid #aaaaaa;
}
.comInformation {
	flex:5;
}
.comSingle,.comNum,.comTotal,.comEdit {
	flex:1;
	justify-content:center;
	align-items:center;
	display:flex;
}
input::-webkit-outer-spin-button,input::-webkit-inner-spin-button {
	-webkit-appearance:none !important;
	margin:0;
}
.comNum input {
	width:37px;
	height:25px;
	text-align:center;
	margin-left:3px;
	margin-right:3px;
}
.add,.cut {
	font-weight:bolder;
}
.:hover {
	color:red;
	cursor:pointer;
}
.gou {
	background:#f07b19;
}
.cha {
	background:red;
}
.gou,.cha {
	width:14px;
	height:14px;
	border-radius:7px;
	font-size:7px;
	color:white;
	border:solid 1px #bcbcbc;
	display:flex;
	justify-content:center;
	align-items:center;
	cursor:pointer;
	position:absolute;
}
.comInformation {
	display:flex;
}
.photo {
	display:flex;
	justify-content:center;
	align-items:center;
	margin-right:20px;
}
.photo img {
	width:72px;
	height:72px;
}
.choose {
	width:15px;
	display:flex;
	height:100%;
	justify-content:center;
	align-items:center;
	margin-left:22px;
	margin-right:22px;
}
.name {
	display:flex;
	flex-direction:column;
	flex:1;
	font-size:14px;
}
.nametop {
	flex:1;
	display:flex;
	align-items:center;
}
.namebottom {
	flex:0.5;
	display:flex;
}
.giftname {
	margin-left:34px;
}
.footer {
	display:flex;
	justify-content:space-between;
	height:60px;
	line-height:60px;
}
.footer-left,.footer-right {
	display:flex;
}
.footer-gou,.footer-cha {
	width:14px;
	height:14px;
	border-radius:7px;
	font-size:7px;
	color:white;
	border:solid 1px #bcbcbc;
	margin-left:22px;
	display:flex;
	justify-content:center;
	align-items:center;
	cursor:pointer;
}
.footer-gou {
	background:#f07b19;
}
.footer-cha {
	background:red;
}
.allchoose {
	margin-left:24px;
	font-size:14px;
	color:#f07b19;
	line-height:60px;
	cursor:pointer;
}
.all {
	font-size:14px;
	line-height:60px;
	margin-left:14px;
	cursor:pointer;
}
.settlement {
	width:205px;
	height:51px;
	margin-left:30px;
	display:flex;
	justify-content:center;
	background:linear-gradient(to top,#fb3023,#f21305);
	color:white;
	font-size:14px;
	font-weight:bolder;
}
.manner {
	line-height:60px;
	height:60px;
	display:flex;
	align-items:center;
}
.money {
	color:red;
}
.itemtotal {
	display:flex;
}
button {
	width:15px;
	height:15px;
}
.fade-enter-active,.fade-leave-active {
	transition:opacity .5s;
}
.fade-enter,.fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
	opacity:0;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

VUE购物车

基于vue的购物车

2
      config0
      2018/11/2 11:30:33

      js中改为 

       list:function(i)<div>

      html中改为   

      <div class="" @click="list(index)">

      删除

      </div>
      </div>
      <div>
      
          <div>
      
              <div>
                  <div>
      
                      <b><div  >
      
      </div></b></div>
              </div>
          </div>
      </div>
      回复
      config0
      2018/11/2 11:26:59
      删除的class名字给格式化删了 请自行添加>.<
      回复