DAY4——腾讯训练营

卡片制作

html文件

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>无标题文档</title>
 <link href="0419.css" type="text/css" rel="stylesheet" />
 </head>

<body>
  <div class="card">
      <div class="card_image">
          <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1492610287248&di=cd64598361ddefa113b348037df8d6c0&imgtype=0&src=http%3A%2F%2Fi-7.vcimg.com%2F6839727a04721d94508e13186a71c4db1168327%2Forigin.jpg" width="135px" height="150px" />
         </div>
         <div class="card_body">
          <div class="card_title">
              <h4 style="text-align:center">TITANIC</h4>
           </div>
             <div class="card_time">
              <p style="text-align:center">December 19,1997</p>
             </div>
             <div class="card_content">
              <h5 style="text-align:center">lead actor/actress </h5>
              <p style="text-align:center">Leonardo DiCaprio</p>
                <p style="text-align:center">Kate Winslet</p>
             </div>
         </div>
</div>
 </body>
 </html>

css文件

*{
 padding:0px;
 margin:0px;
}
.card
 {
 
  width:295px;
  height:150px;
  border:solid 1px #000000;
 }

.card_image
 {
  width:132px;
  height:150px;
  float:left;
  margin-left:5px;
 }

.card_body
 {
  width:147px;
  height:150px;
  float:left;
  margin-left:5px;
 }

.card_title {
 height:25px;
 padding-top:4px;
}


.card_time {
 height:30px;
 width:145px;
}


.card_content {
 height:90px;
}
.card_content p{
 padding-top:2px; 
}

最后的效果图:


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值