鱼C论坛

 找回密码
 立即注册
查看: 3077|回复: 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 | 显示全部楼层
进阶布局 交作业
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.         <meta charset="UTF-8">
  5.         <title>双列自适应布局</title>
  6.         <style type="text/css">
  7.                 * {
  8.                         margin: 0;
  9.                         padding: 0;
  10.                 }

  11.                 .page {
  12.                         width: 100%;
  13.                         background: #000000;
  14.                         position: relative;
  15.                         padding-left: 300px;
  16.                         box-sizing: border-box;
  17.                 }

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

  24.                 .main {
  25.                         width: 100%;
  26.                         height: 1555px;
  27.                         background: #FF88C2;
  28.                         padding: 55px;
  29.                 }

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

  33.                 .main h1 {
  34.                         font-size: 55px;
  35.                         font-family: sans-serif;
  36.                 }

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

  40.                 .side {
  41.                         width: 333px;
  42.                         height: 1555px;
  43.                         background: #F88;
  44.                         position: absolute;
  45.                         left: 0;
  46.                         padding: 33px;
  47.                 }

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

  51.                 .side button {
  52.                         background: #F39C12;
  53.                         border: none;
  54.                         border-radius: 3px;
  55.                         padding: 2px 40px;
  56.                         margin-top: 33px;
  57.                         font-size: 18px;
  58.                 }

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

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

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

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

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

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

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

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

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

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

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

  89.                         And hid his face amid a crowd of stars.<br>
  90.                         怎样在繁星之间藏住了脸。
  91.                 </p>
  92.                 <button>鱼C-SSF</button>
  93.         </div>
  94.         <div class="main">
  95.                 <img src="eg_cute.gif" alt="flowers">
  96.                 <h1>爱情</h1>
  97.                 <p>爱情就美在风险和运气,我们将自身转向了未知、神秘。</p>
  98.         </div>
  99. </div>
  100. </body>
  101. </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 | 显示全部楼层
交作业,这次的作业还得扣图
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>双列自适应</title>
  6.     <style type="text/css">
  7.         *{
  8.             margin:0;
  9.             padding:0;
  10.         }
  11.         .page{
  12.             width:100%;
  13.             background:#000;
  14.             position:relative;
  15.             padding-left:433px;
  16.            box-sizing:border-box;
  17.         }
  18.         .side{
  19.             width:433px;
  20.             height:1555px;
  21.             background: #ff9ea6;
  22.             padding:53px;
  23.             position:absolute;
  24.             left:0;
  25.         }
  26.         .main{
  27.             width:100%;
  28.             height:1555px;
  29.             background:#ff88c2;
  30.             padding:55px;
  31.         }
  32.         .main h1{
  33.             font-size: 55px;
  34.             font-family:"SimSun";
  35.         }
  36.         .main p{
  37.             font-size: 22px;
  38.         }
  39.         .main img{
  40.             margin-top:400px;
  41.         }
  42.         .side img{
  43.             margin-bottom: 33px;
  44.         }
  45.         .side h2{
  46.             font-size:35px;
  47.         }
  48.         .side p{
  49.             margin-top:43px;
  50.         }
  51.         .side button{
  52.             background:#f39c12;
  53.             border:none;
  54.             border-radius:3px;
  55.             padding:3px 40px;
  56.             margin-top:33px;
  57.             font-size:18px;
  58.         }
  59.         .side,.main{
  60.             text-align:center;
  61.             font-family:"Comic Sans MS",cursive;
  62.             color:#fff;
  63.             box-sizing:border-box;
  64.         }

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

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

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

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

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

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

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

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

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

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

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

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

  103.     </div>
  104. </body>
  105. </html>
复制代码

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

使用道具 举报

发表于 2019-11-2 09:34:48 | 显示全部楼层
发现一丢丢小问题,如果当main高度提高像素后,会出现main和side之间有地方重合,如果要解决这个问题是一定要把宽度定值嘛,不能设置成百分比?
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>双列自适应</title>
  6. <style type="text/css">
  7. * {
  8.         margin: 0;
  9.         padding: 0;
  10. }
  11. .page {
  12.         width: 100%;
  13.         background: black;
  14.         position: relative;
  15.         padding-left: 510px;
  16.         box-sizing:border-box;
  17. }
  18. .main {
  19.         padding: 55px;
  20.         width:100%;
  21.         height: 1700px;
  22.         background: #e66767 ;
  23.         color:lightyellow;
  24. }
  25. .main h1 {
  26.         font-size: 55px;
  27.         font-family: "SimSun";
  28. }
  29. .main p {
  30.         font-size: 55px;
  31. }
  32. .main img {
  33.         margin-bottom: 33px;
  34.         margin-top: 400px;
  35. }
  36. .side {
  37.         
  38.         padding: 10px;
  39.         height: 1700px;
  40.         width:530px;
  41.         background: #f8a5c2;
  42.         color: white;
  43.         font-family: "SimSun";
  44.         position: absolute;
  45.         left:0;
  46. }
  47. .side,.main {
  48.         font-size: 22px;
  49.         text-align: center;
  50.         font-family:"Comic Sans MS",cursive;
  51.         box-sizing:border-box;
  52. }
  53. button {
  54.         border:none;
  55.         border-radius:3px;
  56.         padding: 2px 40px;
  57.         margin-top:33px;
  58.         font-size: 28px;
  59.         background: #c44569;
  60.         color:white;
  61.         margin-bottom:10px;
  62. }
  63. </style>
  64. </head>
  65. <body>
  66. <div class="page">
  67.         <div class="side">
  68.                 <img src="未标题-2.png" alt="Flowers">
  69.                 <h2>When you are old</h2>
  70.                 <p>When you are old and grey and full of sleep,<br>
  71.                 当你老了,头发花白,睡意沉沉,<br><br>

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

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

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

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

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

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

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

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

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

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

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

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

使用道具 举报

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

  11. }
  12.         .page{
  13.             width:100%;
  14.             background: #000000;
  15.             position: relative;
  16.             padding-left: 333px;
  17.             box-sizing: border-box;
  18.         }
  19.         .side{
  20.             padding: 33px;
  21.             width: 444px;
  22.             height: 1555px;
  23.             background: #F88;
  24.             position: absolute;
  25.             left: 0;
  26.         }
  27. .side img{
  28.         width:222px;
  29. }
  30.         .main{
  31.             padding: 55px;
  32.             width: 100%;
  33.             height: 1555px;
  34.             background: #FF88C2;
  35.         }
  36.         .main img{
  37.             margin-top: 200px;
  38.         }
  39.         .side,.main{
  40.             text-align: center;
  41.             font-family: "Comic Sans MS", cursive;
  42.             color: #FFF;
  43.             box-sizing: border-box;
  44.         }
  45.         .main h1{
  46.             font-size: 55px;
  47.             font-family: "SimSun";
  48.         }
  49.         .main p{
  50.             font-size: 22px;
  51.         }
  52.         .side img{
  53.             margin-bottom: 33px;
  54.         }
  55.         .side button{
  56.             background: #F39C12;
  57.             border: none;
  58.             border-radius: 3px;
  59.             padding: 2px 40px;
  60.             margin-top: 33px;
  61.             font-size: 18px;
  62.         }
  63.     </style>
  64. </head>
  65. <body>
  66. <div class="page">

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

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

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

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

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

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

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

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

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

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

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

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

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

  99.         <img src="2.png" alt="Fun">
  100.         <h1>爱情</h1>
  101.         <p>爱情就美在风险和运气,我们将自身转向了未知、神秘。</p>
  102.     </div>
  103. </div>
  104. </body>
  105. </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-4-24 10:11

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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