2016-07-26 43 views
-1

当我使窗口变小时,文本会溢出流体容器中某些部分的左列。文本溢出流体容器中的左列

这里是发生了什么enter image description here

这里是他们的代码笔链接,它code pen

感谢PIC,

[R

> body { margin: 60px 60px 60px 60px; font-size: 100%; } h1 { 
> font-family: lobster, Monospace; text-align: center; font-size: 5em; 
> /* 80px/16=5em */ text-decoration: underline; margin-bottom: 60px; 
> border-style: ; } blockquote { font-size: 20px; font-family: 
> 'Puritan', cursive; color: black; } .img-r { 
>  /* other definitions */ 
>  width:100%; } .padding { padding-top: 0px; padding-bottom: 0px; } 
> 
> li { font-family: Monospace; text-align: center; font-size: 2em; /* 
> 80px/16=5em */ text-decoration: ; margin-bottom: 50px; 
> border-style: ; } @media (max-width: 700px){ .jumbotron p { 
>  font-size: 5px; } } .pad { padding: 0px; } 
> 
> "<head> <link href='https://fonts.googleapis.com/css?family=Lobster' 
> rel='stylesheet' type='text/css'> </head> <h1> Dame Stephanie 
> "Steve" Shirley </h1> <div class="container-fluid"> 
>  <div class="jumbotron"> <div class="row"> 
>  <div class="col-xs-12"> 
>   <div class="row"> 
>  <div class="col-xs-9 col-md-6"> 
>   <h2 style="color: #645340; text-decoration: underline;" class="text-center">About 
>   Dame Stephanie "Steve" Shirley </h2> 
>    <ul class="text-center pad"> 
>     <li class="text-center"><em>Dame Stephanie "Steve" Shirley was born as Vera Buchthal to a Jewish father, a judge in 
> Dortmund who lost his post to the Nazi regime, and a non-Jewish 
> Viennese mother.</em></li>     
>     <li class="text-center"><em>In July 1939, at the age of five, Shirley arrived, together with her nine-year-old sister 
> Renate, to Britain as a Kindertransport child refugee.She was placed 
> in the care of foster parents living in the Midlands town of Sutton 
> Coldfield.</em></li> 
>     <li class="text-center"><em>After leaving school Vera decided not to go to university (botany was the "only science then 
> available to my gender") but sought employment in a 
> mathematics/technical environment. At the age of 18, she became a 
> British citizen and changed her name to Stephanie Brook.</em></li> 
>    <li class="text-center"><em>After leaving school Vera decided not to go to university (botany was the "only science then 
> available to my gender") but sought employment in a 
> mathematics/technical environment. At the age of 18, she became a 
> British citizen and changed her name to Stephanie Brook.</em></li> 
> <li class="text-center"><em>In the 1950s, Stephanie worked at the Post 
> Office Research Station at Dollis Hill, building computers from 
> scratch and writing code in machine language. She took evening classes 
> for six years to obtain an honours degree in mathematics. In 1959, she 
> moved to CDL Ltd, designers of the ICT 1301 computer.</em></li> 
>     <li class="text-center"><em>After marriage to a physicist, Derek Shirley, in 1962, Shirley founded, with a capital of 
> £6, the software company Freelance Programmers</em></li> 
>    <li class="text-center"><em> She wanted to create job opportunities for women with dependents, and predominantly employed 
> women, with only 3 male programmers in the first 300 staff,[8] until 
> the Sex Discrimination Act 1975 made that practice illegal.</em></li> 
>    <li class="text-center"><em>She adopted the name, Steve, to help her in the male-dominated business world.[9] Her team's 
> projects included programming Concorde's black box flight 
> recorder.</em></li> 
>     <li class="text-center"><em>Shirley retired in 1993 at the age of 60 and has since focused on her philanthropy.</em></li> 
>     <li class="text-center"><em>Shirley was appointed Officer of the Order of the British Empire (OBE) in the 1980 Queen's 
> Birthday Honours, for services to industry and promoted Dame Commander 
> (DBE) in the New Year Honours, 2000 for services to Information 
> Technology.</em></li> </div> <div class="col-xs-3 col-md-6"> <div 
> class="thumbnail padding"> <img class="img-responsive img-r 
> center-block padding" 
> src="https://ichef.bbci.co.uk/images/ic/480xn/p014nf75.jpg"> <div> <p 
> class="text-center">  Dame Stephanie "Steve" Shirley  </p> 
>  </div> </div> </div> </div> 
>  </div> 
>  </div> 
+0

而且....你不希望它这样做呢?解释预期的结果,所以你很清楚你想要做什么 –

+0

看起来像有人需要检查如何打破文本....如果只有一些问答网站,你可以**搜索**的那种事情! –

+0

@WesFoster不,我不希望文本在窗口大小变小时溢出左侧列。 感谢您的回复 – rdm100

回答

0

添加word-wrap: break-word;li规则

body { 
 
    margin: 60px 60px 60px 60px; 
 
    font-size: 100%; 
 
} 
 
h1 { 
 
font-family: lobster, Monospace; 
 
text-align: center; 
 
font-size: 5em; /* 80px/16=5em */ 
 
text-decoration: underline; 
 
margin-bottom: 60px; 
 
border-style: ; 
 
} 
 
    blockquote { 
 
    font-size: 20px; 
 
    font-family: 'Puritan', cursive; 
 
    color: black; 
 
} 
 
.img-r { 
 
    /* other definitions */ 
 
    width:100%; 
 
} 
 
.padding { 
 
    padding-top: 0px; 
 
    padding-bottom: 0px; 
 
    
 
} 
 

 
li { 
 
font-family: Monospace; 
 
text-align: center; 
 
font-size: 2em; /* 80px/16=5em */ 
 
text-decoration: ; 
 
margin-bottom: 50px; 
 
border-style: ; 
 
    word-wrap: break-word; 
 
} 
 
@media (max-width: 700px){ 
 
    .jumbotron p { 
 
    font-size: 5px; 
 
    } 
 
} 
 
.pad { 
 
    padding: 0px; 
 
}
"<head> 
 
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'> 
 
</head> 
 
<h1> 
 
Dame Stephanie "Steve" Shirley 
 
</h1> 
 
<div class="container-fluid"> 
 
    <div class="jumbotron"> 
 
    <div class="row"> 
 
    <div class="col-xs-12"> 
 
     <div class="row"> 
 
    <div class="col-xs-9 col-md-6"> 
 
     <h2 style="color: #645340; text-decoration: underline;" class="text-center">About 
 
      Dame Stephanie "Steve" Shirley </h2> 
 
       <ul class="text-center pad"> 
 
       <li class="text-center"><em>Dame Stephanie "Steve" Shirley was born as Vera Buchthal to a Jewish father, a judge in Dortmund who lost his post to the Nazi regime, and a non-Jewish Viennese mother.</em></li>     
 
       <li class="text-center"><em>In July 1939, at the age of five, Shirley arrived, together with her nine-year-old sister Renate, to Britain as a Kindertransport child refugee.She was placed in the care of foster parents living in the Midlands town of Sutton Coldfield.</em></li> 
 
       <li class="text-center"><em>After leaving school Vera decided not to go to university (botany was the "only science then available to my gender") but sought employment in a mathematics/technical environment. At the age of 18, she became a British citizen and changed her name to Stephanie Brook.</em></li> 
 
       <li class="text-center"><em>After leaving school Vera decided not to go to university (botany was the "only science then available to my gender") but sought employment in a mathematics/technical environment. At the age of 18, she became a British citizen and changed her name to Stephanie Brook.</em></li> 
 
<li class="text-center"><em>In the 1950s, Stephanie worked at the Post Office Research Station at Dollis Hill, building computers from scratch and writing code in machine language. She took evening classes for six years to obtain an honours degree in mathematics. In 1959, she moved to CDL Ltd, designers of the ICT 1301 computer.</em></li> 
 
        <li class="text-center"><em>After marriage to a physicist, Derek Shirley, in 1962, Shirley founded, with a capital of £6, the software company Freelance Programmers</em></li> 
 
       <li class="text-center"><em> She wanted to create job opportunities for women with dependents, and predominantly employed women, with only 3 male programmers in the first 300 staff,[8] until the Sex Discrimination Act 1975 made that practice illegal.</em></li> 
 
       <li class="text-center"><em>She adopted the name, Steve, to help her in the male-dominated business world.[9] Her team's projects included programming Concorde's black box flight recorder.</em></li> 
 
       <li class="text-center"><em>Shirley retired in 1993 at the age of 60 and has since focused on her philanthropy.</em></li> 
 
        <li class="text-center"><em>Shirley was appointed Officer of the Order of the British Empire (OBE) in the 1980 Queen's Birthday Honours, for services to industry and promoted Dame Commander (DBE) in the New Year Honours, 2000 for services to Information Technology.</em></li> 
 
</div> 
 
<div class="col-xs-3 col-md-6"> 
 
    <div class="thumbnail padding"> 
 
    <img class="img-responsive img-r center-block padding" src="https://ichef.bbci.co.uk/images/ic/480xn/p014nf75.jpg"> 
 
<div> 
 
<p class="text-center"> 
 
    Dame Stephanie "Steve" Shirley 
 
    </p> 
 
    </div> 
 
</div> 
 
</div> 
 
    </div> 
 
    </div> 
 
    </div> 
 

+0

感谢您的信息LGSon! – rdm100