我只是在创建一些基本的 HTML/CSS。我正在创建带有阴影背景的叠加文本、按钮和文本。但是,阴影框中的文本应该在触及宽度时换行,但在 Chrome 中没有。但它适用于 IE 和 FF。
JSFiddle:http: //jsfiddle.net/QN6NS/1/
HTML:
<div class="bkgrndImgExecClub">
<div class="frameContent backgroundBox basic">
<p>Passar pelo aeroporto com rapidez utilizando o aplicativo da Bwefwef wefwef</p>
</div>
<p class="creditText">Foto por michael Chudakov Club member desde 2003</p>
<input type="submit" value="O significado de pertencer" name="callToAction" class="button primary">
</div>
CSS:
body {
font-family: Arial, Verdana, sans-serif;
}
.frameContent {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
left: 30px;
top: 50px;
word-wrap: break-word;
position: absolute;
width: 250px;
padding-left: 12px;
transition: background 0.15s ease-in-out 0s;
}
.bkgrndImgExecClub {
background-image: url(TIM_BANNERS_BLUE_LATAM_PT_TEST-IMAGE_1.jpg);
background-repeat: no-repeat;
height: 180px;
width: 760px;
position: relative;
}
.frameContent p {
color: #FFFFFF;
text-decoration: none;
text-shadow: 1px 1px 2px #000000;
font-weight: bold;
}
.creditText {
right: 20px;
top: 10px;
word-wrap: break-word; /*This doesn't seem to work in Chrome*/
position: absolute;
width: 200px;
text-align: right;
font-size: 8px;
font-size: 0.80em;
font-weight: bold;
}
.button.primary {
background: #ce210f;
background: -moz-linear-gradient(top, #ff3e3e 0%, #ce210f 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff3e3e), color-stop(100%,#ce210f));
background: -webkit-linear-gradient(top, #ff3e3e 0%,#ce210f 100%);
background: -o-linear-gradient(top, #ff3e3e 0%,#ce210f 100%);
background: -ms-linear-gradient(top, #ff3e3e 0%,#ce210f 100%);
background: linear-gradient(top, #ff3e3e 0%,#ce210f 100%);
color: #fff;
font-weight: bold;
}
.button {
border: 1px solid #AE1000;
border-radius: 3px 3px 3px 3px;
position:absolute;
right: 15px;
bottom: 20px;
padding: 5px;
font-size: 7.5px;
font-size: 0.75rem;
line-height: 12px;
line-height: 1.2rem;
}