V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
guyeuro
V2EX  ›  问与答

div 不能换行怎么办?

  •  
  •   guyeuro · 2017-08-14 00:39:01 +08:00 · 1373 次点击
    这是一个创建于 2471 天前的主题,其中的信息可能已经有所发展或是发生改变。

    下面这个 help-block 的文字总是和虚线框同一行 有没有什么方法让其换行?

    http://chuantu.biz/t6/3/1502642277x1989153963.png [img]http://chuantu.biz/t6/3/1502642277x1989153963.png[/img]

    <div class="span10">
    	<form:textarea path="StrategyEntity.financeSMS" id="financeSMS" maxlength="200" class="input-xxlarge" rows="4" htmlEscape="false"></form:textarea>
    	<div>
            <button type="button" class="btn btn-default btn_template" value="{phoneNumber}">当前手机号</button>
    		<div style="border:1px dashed #444444" class="span10">
    	        <center><p><strong>选项:</strong><p/></center>
    			<button type="button" class="btn btn-default btn_template"
    					value="{effect_mode_1}">等额本息
    			</button>
    			<button type="button" class="btn btn-default btn_template"
    					value="{effect_mode_2}">等额本金 A
    			</button>
    			<button type="button" class="btn btn-default btn_template"
    					value="{effect_mode_3}">等额本金 B
    			</button>
    			<button type="button" class="btn btn-default btn_template"
    					value="{effect_mode_4}">到期还本付息
    			</button>
    		</div>
        </div>
    	<div  class="help-block" word-break:break-all;>点击上述按钮选择,根据您的当前资金状况,以及您的风险意识,选择适合您的方案,以上述说明为主
        </div>
    </div>
    
    第 1 条附言  ·  2017-08-14 01:24:47 +08:00
    <div class="span10">上面还有几层 div

    <div class="new-border sf1 sf3">
    <div class="formField" style="display:none">
    <div class="row-fluid">
    <div class="span10">

    其中

    .new-border{width:100%;border:1px solid #f1f1f1;margin:0 0 25px 0;float:left;}

    .row-fluid>div {
    width: 100% !important;
    margin: 0 !important;
    }
    4 条回复    2017-08-14 01:08:14 +08:00
    IamJ
        1
    IamJ  
       2017-08-14 00:45:48 +08:00
    span10 浮动了吧

    如果是的话, .help-block { clear: both;}
    paloalto
        2
    paloalto  
       2017-08-14 00:47:25 +08:00
    <div class="help-block" word-break:break-all;>

    惊了,这啥写法?

    还有,看下最外层的这个 <div class="span10"> ,span10 这个 class 是不是被设置成 display:inline 或者 display:inline-block 了?
    guyeuro
        3
    guyeuro  
    OP
       2017-08-14 01:05:39 +08:00
    @IamJ .help-block { clear: both;}

    你是说要修改.help-block 的定义?
    这个是 bootstrap.css 定义的,不是自定义的啊
    guyeuro
        4
    guyeuro  
    OP
       2017-08-14 01:08:14 +08:00
    @paloalto <div class="span10"> 这个 div 的上级的上级 div 有一个 .new-border{width:100%;border:1px solid #f1f1f1;margin:0 0 25px 0;float:left;}

    这种状况如何换行?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2609 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 13:26 · PVG 21:26 · LAX 06:26 · JFK 09:26
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.