解决CSS float 父层定义的颜色无法显示方法

  次阅读 作者:智能小宝 来源:互联网 2016-03-25 16:14 我要评论(0)

本文章来介绍一下关于解决CSS float 父层定义的颜色无法显示方法 ,有需要了解的同学可以参考一下关于css float的用法。

代码如下

复制代码

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Fixed Width Layout - Outer container collapsed</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">

body

{

margin:0;

padding:0;

text-align:center;

background:#f0f0f0 url("body-bg.gif") repeat-x top;

}

#wrapper{

text-align:left;

width:770px;

margin:10px auto;

background:#dade75;

border:1px solid silver;

}

#header{

padding:10px 15px 10px 13px;

background:#272727 url(header-bg.gif) repeat-x bottom left;

}

#content-wrapper{

width:570px;

float:right;

background:#fff url(nav-to-content-trans.gif) repeat-y left;

}

#content-inner{

padding:10px 5px 5px 10px;

}

#navigation{

float:left;

width:200px;

padding-top:15px;

}

</style></head><body><div id="wrapper"><div id="header"><img src="swanky-header-graphic.gif" alt="Swanky header graphic" width="377" height="41" /></div><div id="content-wrapper">

<div id="content-inner">

<p>We flew with Czech Airlines and weren't expecting a swish ride; we also weren't expecting to be fed on such a short flight on economy tickets, so we gorged on overpriced breakfast in Stansted airport and didn't know what to do when the flight attendants appeared with trays of pre-packaged food. As usual, greedy guts (me) polished off the sweet items that Manda couldn't quite face so early in the day. </p>

<p>After a smooth flight, we landed under an ominous-looking sky. It was looking dark and moody in the distance, as if to prove that the five days of thunderstorms forecast for Prague were soon to start. Strangely, though, despite the grey skies in the distance it was hot and sunny as we stepped off the plane to the transfer bus. We might just get lucky with the weather, I thought. </p>

<p>Once we got through the usual arrival procedures of claiming baggage, immigration checks etc, we made our way out to where all the transfer buses were waiting for tired travellers. We immediately headed to the right, following a tip from one of Manda's colleagues that there were cheap transfer buses there - a 90 crown fare (approx2.50) to drop in the centre as opposed to the 490 crown charge for a transfer right to the hotel front door. Luckily, the drop-off point, just around the corner from the Municipal Building, turned out to be an 8-minute walk from our hotel. </p>

本站文章信息来源于网络以及网友投稿,本站只负责对文章进行整理、排版、编辑,是出于传递更多信息之目的,并不意味着赞同其观点或证实其内容的真实性。如果您有什么意见或建议,请联系QQ28-1688-302!

人工智能实验室
相关文章相关文章
  • 英国研发“杀生”机器人 通过生命体获取能量

    英国研发“杀生”机器人 通过生命体获取能量

  • 无人驾驶汽车如何改变城市生活?听听他们怎么说

    无人驾驶汽车如何改变城市生活?听听他们怎么说

  • 未来两年人工智能要怎么走?看这篇就够了

    未来两年人工智能要怎么走?看这篇就够了

  • 韩春雨称已能重复实验结果 近期将有消息公布

    韩春雨称已能重复实验结果 近期将有消息公布

网友点评网友点评
阅读推荐阅读推荐

据国外媒体报道,在过去两年内,聊天机器人(chatbot)、人工智能以及机器学习的研发和采用取得了巨大进展。许多初创公司正利用人工智能和...

霍金 视觉中国 图 英国著名物理学家霍金(Stephen Hawking)再次就人工智能(AI)发声,他认为:对于人类来说,强大AI的出现可能是最美妙的...

文|郑娟娟 今年,人工智能(AI) 60岁了。在AI60岁的时候,笔者想要介绍一下AI100,一个刚刚2岁的研究项目,但它的预设寿命是100年,甚至更长...

AlphaGo与李世石的人机大战,为大众迅速普及了人工智能的概念。 但对谷歌而言,除了下围棋,现在的人工智能进展到哪一步了?未来,人工智能...