小米卡的css写法

先上图

代码

<head>
		<meta charset="UTF-8">
		<title>小米</title>
		<style type="text/css">
			body {
				background-color: gainsboro;
			}
			
			.wrap {
				background-color: white;
				width: 234px;
				height: 300px;
				padding: 20px 0px;
				box-sizing: border-box;
				margin: 0px auto;
			}
			.wrap:hover{
				z-index: 2;
				box-shadow: 0px 15px 30px  rgba(0,0,0,0.1);
				margin-top: -2px;
				transition: .3s;
				
			}
			.wrap .img1 {
				height: 160px;
				width: 160px;
				display: block;
				margin: 0px auto;
				margin-bottom: 24px;
			}
			
			.wrap a {
				color: rgb(51, 51, 51);
				font-size: 14px;
				line-height: 21px;
				display: block;
				width: 100%;
				text-decoration: none;
				text-align: center;
				margin-bottom: 2px;
			}
			
			.wrap .desc {
				color: rgb(176, 176, 176);
				font-size: 12px;
				text-align: center;
				margin-top: 0px;
				margin-bottom: 10px;
			}
			.wrap .price {
				text-align: center;
			}
			.wrap .price .now-price{
				font-size:14px ;
				color: #ff6700;
			}
			.wrap .price del{
				font-size: 14px;
				color: rgb(176,176,176);
				
			}
		</style>
	</head>

	<body>
		<div class="wrap">
			<img class="img1" src="img/111.jpg" / width="" height="">
			<a href="">mate100pro宇霸尊享版 </a>
			<p class="desc">晓龙85555684 360du面屏 </p>
			<p class="price"><span class="now-price">1000元 </span>  <del class="">888元</del></p>
				
			

		</div>
	</body>

</html>

效果图
在这里插入图片描述
由于只用到了css没有js 和页面用的是不一样的

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值