gpt4 book ai didi

jquery - 如何使文本从左右 Bootstrap 流动

转载 作者:行者123 更新时间:2023-11-28 06:08:49 27 4
gpt4 key购买 nike

我试图获得的效果是在 bootstrap 中使用列从左到右文本流动的位置。在第一个部分的第十二列之后,我想换行,希望代码能让它更清晰。

<?php

?>

<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<script type="text/javascript" src="jquery.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<link rel="stylesheet" href="file.css"/>
</head>
<body>
<div class="navbar navbar-default">
<div class="container">

<div class="navbar-header">
<button class="navbar-toggle" data-toggle="collapse" data-target=".navCollapse">f</button>
<a href="#" class="navbar-brand">
FLINTATION LOGO
</div>



<div class="collapse navbar-collapse navCollapse">
<ul class="nav navbar-nav navvbar-right">
<li><a href="#">Home</a></li>
<li><a href="#">Home</a></li>
<li><a href="#">Home</a></li>
<li><a href="#">Home</a></li>
<li><a href="#">Home</a></li>
</ul>
</div>
</div>
</div>

<div class="container">
<div class="col-sm-8">
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain wa
s born and I will give you a complete account of the system, and expound the actual teachings of th
e great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or
avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue
or pursues or desires to obtain pain of itself, because it is pain, but because occas
ionally circumstances occur in which toil and pain can procure him some great pleasure. To take
a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some ad
vantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has n
o annoying consequences, or one who avoids a pain that produces no resultant pleasure?"
</div>

<div class="col-sm-4">
<img src="images/amber.png"/>
<div><br>

<div id="left">
<div>
But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain wa
s born and I will give you a complete account of the system, and expound the actual teachings of th
e great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or
avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue
</div>
</div>

</body>

After the amber.png file on the page I want the next div to appear onto a new line starting from the left, instead of right.

希望大家能理解,有问题尽管问!

谢谢杰弗里。

最佳答案

您需要使用适当的结构,包括 Bootstrap .row 和列

一般结构是

<div class="container">
<div class="row">
<div class="col-sm-8">
</div>

<div class="col-sm-4">
<img/>
</div>

<div id="left" class="col-sm-12"> /* or whatever width */
</div>
</div>

</div>

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />
<div class="container">
<div class="row">
<div class="col-sm-8">
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain wa s born and I will give you a complete account of the system, and expound the actual teachings of th e great explorer of the truth, the master-builder of
human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue or pursues or desires to obtain pain of itself, because it is pain, but because occas ionally circumstances
occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some ad vantage from it? But who has any right to find fault with a man who chooses
to enjoy a pleasure that has n o annoying consequences, or one who avoids a pain that produces no resultant pleasure?"
</div>

<div class="col-sm-4">
<img src="http://lorempixel.com/image_output/food-q-c-200-200-1.jpg" />
</div>

<div id="left" class="col-sm-12">
But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain wa s born and I will give you a complete account of the system, and expound the actual teachings of th e great explorer of the truth, the master-builder of human
happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue
</div>
</div>

</div>

Codepen Demo

关于jquery - 如何使文本从左右 Bootstrap 流动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36294264/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com