当我缩小窗口时,文本会溢出流体容器中某些部分的左列。
以下是enter image description here
所发生情况的图片以下是其代码笔的链接code pen
谢谢,
[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)
将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>