如何在Bootstrap中叠加?

Dar*_*ryl 2 html css twitter-bootstrap twitter-bootstrap-3

我正在使用引导程序,并且有一个锚标记,一些我想覆盖在另一个文本区域的一角的文本。问题是,引导程序列浪费了空间。以下是id现在正在执行的操作,并带有div的突出显示,下面是我希望文本流动的方式:

当前

当前

<div id="mainWrapper" class="wrapper">
    <div class="content-main">
        <div class="container-fluid">
            <div class="row">
                <div class="col-xxs-12 col-xs-10">
                    <p>Chuck Norris challenged Spain to a football match and won Chuck Norris can win a game of Connect Four in only three moves. Chuck Norris does not sleep. He waits. The Great Wall of China was originally created to keep Chuck Norris out. It failed miserably, Chuck Norris is the reason why Waldo is hiding, Chuck Norris drives an ice cream truck covered in human skulls. When Chuck Norris went to Vegas, Sinatra sang "Your Way.", Remember the Soviet Union? They decided to quit after watching a DeltaForce marathon on Satellite TV Chuck Norris counted to infinity - twice. </p>
                </div>
                <div class="col-xxs-12 col-xs-2 semi-transparent">
                    <a html="www.google.com">Spanish</a>
                </div>
            </div>
        </div>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

所需的选项1(包装)

期望的

所需的选项2(顶部浮动)

在此处输入图片说明

最好的方法是什么?

Bri*_*ian 5

Bootstrap有一个用于关闭按钮的类,就像您想要的一样,它位于顶部。这可能很有用。像这样使用它:

<div class="col-xxs-12 col-xs-10">
    <div class="close">
        <a html="www.google.com">Spanish</a>
    </div>
    <p>Chuck Norris challenged Spain to a football match and won Chuck Norris can win a game of Connect Four in only three moves. Chuck Norris does not sleep. He waits. The Great Wall of China was originally created to keep Chuck Norris out. It failed miserably, Chuck Norris is the reason why Waldo is hiding, Chuck Norris drives an ice cream truck covered in human skulls. When Chuck Norris went to Vegas, Sinatra sang "Your Way.", Remember the Soviet Union? They decided to quit after watching a DeltaForce marathon on Satellite TV Chuck Norris counted to infinity - twice. </p>
</div>
Run Code Online (Sandbox Code Playgroud)

您可能可以向其添加另一个类以覆盖它。