鱼C论坛

 找回密码
 立即注册
查看: 3201|回复: 11

[庖丁解牛] 0 0 4 9 - 双列自适应布局 | 【情人节特刊 - 当你老了】

[复制链接]
发表于 2017-2-14 19:39:10 | 显示全部楼层 |阅读模式
购买主题 已有 14 人购买  本主题需向作者支付 2 鱼币 才能浏览

本帖被以下淘专辑推荐:

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2017-2-14 20:19:01 | 显示全部楼层
好下功夫阿

评分

参与人数 1荣誉 +5 鱼币 +5 贡献 +5 收起 理由
不二如是 + 5 + 5 + 5 情人节都来鱼C学习,未来不进入上流阶层你.

查看全部评分

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2017-2-14 22:39:13 | 显示全部楼层

必须滴~
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2017-3-6 23:17:44 From FishC Mobile | 显示全部楼层
是不是有必要用你教的爬虫来一次性爬取这个区域的文章,不然翻页好麻烦
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2017-5-3 10:17:37 | 显示全部楼层
进阶布局 交作业
<!DOCTYPE html>
<html lang="en">
<head>
        <meta charset="UTF-8">
        <title>双列自适应布局</title>
        <style type="text/css">
                * {
                        margin: 0;
                        padding: 0;
                }

                .page {
                        width: 100%;
                        background: #000000;
                        position: relative;
                        padding-left: 300px;
                        box-sizing: border-box;
                }

                .side, .main {
                        text-align: center;
                        font-family: "Comic Sans MS", cursive;
                        color: #FFF;
                        box-sizing: border-box;
                }

                .main {
                        width: 100%;
                        height: 1555px;
                        background: #FF88C2;
                        padding: 55px;
                }

                .main img {
                        margin-top: 400px;
                }

                .main h1 {
                        font-size: 55px;
                        font-family: sans-serif;
                }

                .main p {
                        font-size: 22px;
                }

                .side {
                        width: 333px;
                        height: 1555px;
                        background: #F88;
                        position: absolute;
                        left: 0;
                        padding: 33px;
                }

                .side img {
                        margin-bottom: 33px;
                }

                .side button {
                        background: #F39C12;
                        border: none;
                        border-radius: 3px;
                        padding: 2px 40px;
                        margin-top: 33px;
                        font-size: 18px;
                }

        </style>
</head>
<body>
<div class="page">
        <div class="side">
                <img src="p9.png">
                <h2>When you are old</h2>
                <p>
                        When you are old and grey and full of sleep,<br>
                        当你老了,头发花白,睡意沉沉,<br><br>

                        And nodding by the fire,take down this book,<br>
                        倦坐在炉边,取下这本书来,<br><br>

                        And slowly read,and dream of the soft look<br>
                        慢慢读着,追梦当年的眼神<br><br>

                        Your eyes had once,and of their shadows deep;<br>
                        你那柔美的神采与深幽的晕影。<br><br>

                        How many loved your moments of glad grace,<br>
                        多少人爱过你昙花一现的身影,<br><br>

                        And loved your beauty with love false or true,<br>
                        爱过你的美貌,以虚伪或真情,<br><br>

                        But one man loved the pilgrim Soul in you<br>
                        惟独一人曾爱你那朝圣者的心,<br><br>

                        And loved the sorrows of your changing face;<br>
                        爱你哀戚的脸上岁月的留痕。<br><br>

                        And bending down beside the glowing bars,<br>
                        在炉罩边低眉弯腰,<br><br>

                        Murmur,a little sadly,how Love fled<br>
                        忧戚沉思,喃喃而语,<br><br>

                        And paced upon the mountains overhead<br>
                        爱情是怎样逝去,又怎样步上群山,<br><br>

                        And hid his face amid a crowd of stars.<br>
                        怎样在繁星之间藏住了脸。
                </p>
                <button>鱼C-SSF</button>
        </div>
        <div class="main">
                <img src="eg_cute.gif" alt="flowers">
                <h1>爱情</h1>
                <p>爱情就美在风险和运气,我们将自身转向了未知、神秘。</p>
        </div>
</div>
</body>
</html>
0039双列自适应布局.png
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2017-7-25 07:57:23 | 显示全部楼层
我去,这b格瞬间就上来了啊!!!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2017-7-25 13:31:36 | 显示全部楼层
交作业!
049.jpg
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2018-6-22 22:10:01 | 显示全部楼层
交作业,这次的作业还得扣图
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>双列自适应</title>
    <style type="text/css">
        *{
            margin:0;
            padding:0;
        }
        .page{
            width:100%;
            background:#000;
            position:relative;
            padding-left:433px;
           box-sizing:border-box;
        }
        .side{
            width:433px;
            height:1555px;
            background: #ff9ea6;
            padding:53px;
            position:absolute;
            left:0;
        }
        .main{
            width:100%;
            height:1555px;
            background:#ff88c2;
            padding:55px;
        }
        .main h1{
            font-size: 55px;
            font-family:"SimSun";
        }
        .main p{
            font-size: 22px;
        }
        .main img{
            margin-top:400px;
        }
        .side img{
            margin-bottom: 33px;
        }
        .side h2{
            font-size:35px;
        }
        .side p{
            margin-top:43px;
        }
        .side button{
            background:#f39c12;
            border:none;
            border-radius:3px;
            padding:3px 40px;
            margin-top:33px;
            font-size:18px;
        }
        .side,.main{
            text-align:center;
            font-family:"Comic Sans MS",cursive;
            color:#fff;
            box-sizing:border-box;
        }

    </style>
</head>
<body>
    <div class="page">
        <div class="side">
            <img src="2.png" alt="Flowers">
            <h2>When you are old</h2>
            <p>When you are old and grey and full of sleep,<br>
                当你老了,头发花白,睡意沉沉,<br><br>

                And nodding by the fire,take down this book,<br>
                倦坐在炉边,取下这本书来,<br><br>

                And slowly read,and dream of the soft look<br>
                慢慢读着,追梦当年的眼神<br><br>

                Your eyes had once,and of their shadows deep;<br>
                你那柔美的神采与深幽的晕影。<br><br>

                How many loved your moments of glad grace,<br>
                多少人爱过你昙花一现的身影,<br><br>

                And loved your beauty with love false or true,<br>
                爱过你的美貌,以虚伪或真情,<br><br>

                But one man loved the pilgrim Soul in you<br>
                惟独一人曾爱你那朝圣者的心,<br><br>

                And loved the sorrows of your changing face;<br>
                爱你哀戚的脸上岁月的留痕。<br><br>

                And bending down beside the glowing bars,<br>
                在炉罩边低眉弯腰,<br><br>

                Murmur,a little sadly,how Love fled<br>
                忧戚沉思,喃喃而语,<br><br>

                And paced upon the mountains overhead<br>
                爱情是怎样逝去,又怎样步上群山,<br><br>

                And hid his face amid a crowd of stars.<br>
                怎样在繁星之间藏住了脸。</p>
            <button>鱼C-不二如是</button>
        </div>
        <div class="main">
            <img src="1.png" alt="Fun">
            <h1>爱情</h1>
            <p>爱情就美在风险和运气,我们将自身转向了未知、神秘。</p>
        </div>

    </div>
</body>
</html>
双列自适应.png
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-11-2 09:34:48 | 显示全部楼层
发现一丢丢小问题,如果当main高度提高像素后,会出现main和side之间有地方重合,如果要解决这个问题是一定要把宽度定值嘛,不能设置成百分比?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>双列自适应</title>
<style type="text/css">
* {
        margin: 0;
        padding: 0;
}
.page {
        width: 100%;
        background: black;
        position: relative;
        padding-left: 510px;
        box-sizing:border-box;
}
.main {
        padding: 55px;
        width:100%;
        height: 1700px;
        background: #e66767 ;
        color:lightyellow;
}
.main h1 {
        font-size: 55px;
        font-family: "SimSun";
}
.main p {
        font-size: 55px;
}
.main img {
        margin-bottom: 33px;
        margin-top: 400px;
}
.side {
        
        padding: 10px;
        height: 1700px;
        width:530px;
        background: #f8a5c2;
        color: white;
        font-family: "SimSun";
        position: absolute;
        left:0;
}
.side,.main {
        font-size: 22px;
        text-align: center;
        font-family:"Comic Sans MS",cursive;
        box-sizing:border-box;
}
button {
        border:none;
        border-radius:3px;
        padding: 2px 40px;
        margin-top:33px;
        font-size: 28px;
        background: #c44569;
        color:white;
        margin-bottom:10px;
}
</style>
</head>
<body>
<div class="page">
        <div class="side">
                <img src="未标题-2.png" alt="Flowers">
                <h2>When you are old</h2>
                <p>When you are old and grey and full of sleep,<br>
                当你老了,头发花白,睡意沉沉,<br><br>

                And nodding by the fire,take down this book,<br>
                倦坐在炉边,取下这本书来,<br><br>

                And slowly read,and dream of the soft look<br>
                慢慢读着,追梦当年的眼神<br><br>

                Your eyes had once,and of their shadows deep;<br>
                你那柔美的神采与深幽的晕影。<br><br>

                How many loved your moments of glad grace,<br>
                多少人爱过你昙花一现的身影,<br><br>

                And loved your beauty with love false or true,<br>
                爱过你的美貌,以虚伪或真情,<br><br>

                But one man loved the pilgrim Soul in you<br>
                惟独一人曾爱你那朝圣者的心,<br><br>

                And loved the sorrows of your changing face;<br>
                爱你哀戚的脸上岁月的留痕。<br><br>

                And bending down beside the glowing bars,<br>
                在炉罩边低眉弯腰,<br><br>

                Murmur,a little sadly,how Love fled<br>
                忧戚沉思,喃喃而语,<br><br>

                And paced upon the mountains overhead<br>
                爱情是怎样逝去,又怎样步上群山,<br><br>

                And hid his face amid a crowd of stars.<br>
                怎样在繁星之间藏住了脸。</p>

                <button>让编程改变世界</button>
        </div>
        <div class="main">
                <img src="未标题-1.png" alt="Fun">
                <h1>爱情</h1>
                <p>爱情就美在风险和运气,我们将自身转向了未知、神秘。</p>
        </div>
</div>
</body>
</html>
12.png
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-1-9 23:05:01 | 显示全部楼层
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <title>双列自适应</title>
    <style type="text/css">
*{
    margin: 0;
    padding:  0;

}
        .page{
            width:100%;
            background: #000000;
            position: relative;
            padding-left: 333px;
            box-sizing: border-box;
        }
        .side{
            padding: 33px;
            width: 444px;
            height: 1555px;
            background: #F88;
            position: absolute;
            left: 0;
        }
.side img{
        width:222px;
}
        .main{
            padding: 55px;
            width: 100%;
            height: 1555px;
            background: #FF88C2;
        }
        .main img{
            margin-top: 200px;
        }
        .side,.main{
            text-align: center;
            font-family: "Comic Sans MS", cursive;
            color: #FFF;
            box-sizing: border-box;
        }
        .main h1{
            font-size: 55px;
            font-family: "SimSun";
        }
        .main p{
            font-size: 22px;
        }
        .side img{
            margin-bottom: 33px;
        }
        .side button{
            background: #F39C12;
            border: none;
            border-radius: 3px;
            padding: 2px 40px;
            margin-top: 33px;
            font-size: 18px;
        }
    </style>
</head>
<body>
<div class="page">

    <div class="side">
        <img src="3.png" alt="Flowers">
        <h2>When you are old</h2>

        <p>When you are old and grey and full of sleep,<br>
            当你老了,头发花白,睡意沉沉,<br><br>

            And nodding by the fire,take down this book,<br>
            倦坐在炉边,取下这本书来,<br><br>

            And slowly read,and dream of the soft look<br>
            慢慢读着,追梦当年的眼神<br><br>

            Your eyes had once,and of their shadows deep;<br>
            你那柔美的神采与深幽的晕影。<br><br>

            How many loved your moments of glad grace,<br>
            多少人爱过你昙花一现的身影,<br><br>

            And loved your beauty with love false or true,<br>
            爱过你的美貌,以虚伪或真情,<br><br>

            But one man loved the pilgrim Soul in you<br>
            惟独一人曾爱你那朝圣者的心,<br><br>

            And loved the sorrows of your changing face;<br>
            爱你哀戚的脸上岁月的留痕。<br><br>

            And bending down beside the glowing bars,<br>
            在炉罩边低眉弯腰,<br><br>

            Murmur,a little sadly,how Love fled<br>
            忧戚沉思,喃喃而语,<br><br>

            And paced upon the mountains overhead<br>
            爱情是怎样逝去,又怎样步上群山,<br><br>

            And hid his face amid a crowd of stars.<br>
            怎样在繁星之间藏住了脸。</p>
        <button>
            鱼C-苏十八
        </button>
    </div>
    <div class="main">

        <img src="2.png" alt="Fun">
        <h1>爱情</h1>
        <p>爱情就美在风险和运气,我们将自身转向了未知、神秘。</p>
    </div>
</div>
</body>
</html>
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-3-16 18:25:45 | 显示全部楼层

撸鉄2.png
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2020-6-6 18:25:43 | 显示全部楼层

你的花花那个图片哪里来的啊
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-6-9 13:58

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表