CSS 入门-图文组合

本文介绍了CSS入门级别的图文组合布局,包括图文左右排列和上下排列的方法,强调了区域划分在布局中的关键作用。
摘要由CSDN通过智能技术生成

 对于不同的图文组合,划分好区域最重要,区域划分好,文字图片放进去即可。

一:图文左右排列


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>1</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .item {
            width: 643px;
            height: 174px;
            border-bottom: 1px solid lightgray;
            /* background-color: pink; */
        }
        .item .content {
            width: 457px;
            height: 174px;
            /* background-color: gold; */
            float: left;
        }
        .item .content .title{
            height: 24px;
            line-height: 24px;
            overflow: hidden;
            /* background-color: cyan; */
            font-size: 20px;
            font-weight: 900;
            margin-top: 24px;
        }
        .item .content .words {
            height: 78px;
            line-height: 26px;
            font-size: 14px;
            overflow: hidden;
            color: lightgray;
            margin-top: 10px;
            /* background-color: bisque; */
        }
        .item .content .bottom{
            height: 20px;
            /* background-color:aqua; */
            margin-top: 6px;
            font-size: 14px;
            color: lightgray;
        }
        .item .content .bottom p{
            float: left;
            height: 20px;
            line-height: 20px;
            font-size: 12px;
        }
        .item .content .bottom .common{
            float: left;
            height: 20px;
            overflow: hidden;
            margin-left: 10px;
            padding: 0 3px;
        }
        .item .content .bottom img {
            margin-top: 2px;
            height: 16px;
            float: left;
            margin-right: 4px;
        }
        .item .content .bottom .text{
            float: left;
            padding: 0 5px;
        }
        /* .item .content .bottom .b2 img {
            margin-top: 2px;
            height: 16px;
            float: left;
            margin-right: 4px;
        } */
        .item .right {
            width: 148px;
            height: 98px;
            float: right;
          
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值