1

基本的な 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;
}
4

2 に答える 2

0

ブラウザーはフォントを異なる方法でレンダリングすることができ、単語をスペースで区切ろうとします。あなたの例は私には普通に見えます。(現在はスペースで中断)

「 ba」が新しい行にドロップしないことについて話している場合、および本当にdaBweffwefが一緒に必要な場合。スペースを 

2 つの単語の間にスペースを追加することはできますが、何があってもブラウザー間で壊れないようにします。

したがって、次のようにすることができます。

<p>Passar pelo aeroporto com rapidez utilizando o aplicativo da&nbsp;Bwefwef wefwef</p>

また

<p>Passar pelo aeroporto com rapidez utilizando o aplicativo da&nbsp;Bwefwef&nbsp;wefwef</p>

これは、設計の優れたプラクティスでもあります。

これが役立つことを願っています。:)

于 2015-09-22T00:04:10.503 に答える