guyeuro
V2EX  ›  问与答

html: div 内部的 p 元素中的文字不显示怎么回事?

  •  
  •   guyeuro · Aug 14, 2017 · 2847 views
    This topic created in 3381 days ago, the information mentioned may be changed or developed.

    如下

    <div style="border:1px dashed #444444" class="span10">
        <p  >请在下面按钮中个选择:</p>
    	<button type="button" class="btn btn-default btn_template"
    											value="{k1}">红色
    									</button>
        <button type="button" class="btn btn-default btn_template"
    											value="{k2}">蓝色
    									</button>
    </div>
    

    “请在下面按钮中个选择”这几个字显示不出来怎么回事?

    这个 div 是内部的 div,外面还有好几层 div 可能的原因是什么?如何强制显示 p 元素中的字?试过加了 align="left" align="center"等不起作用

    7 replies  •  2017-08-14 09:49:01 +08:00
    lzhr
    lzhr
    Aug 14, 2017
    1
    css 呢
    TabGre
    TabGre
    Aug 14, 2017
    2
    没有 CSS 怎么判断呀?最好上 codepen 等在线展示下,没有上下文,是在帮不上忙
    ys0290
    ys0290
    Aug 14, 2017 via iPhone
    3
    代码里写了却没显示,要 css 一起看的
    guyeuro
    guyeuro
    OP
    Aug 14, 2017
    4
    @TabGre

    前后文很多啊,上面还有多层 div,怎么展示?
    这种 p 文字不显示的情况有哪些可能?
    guyeuro
    guyeuro
    OP
    Aug 14, 2017
    5
    <div class="new-border sf1 sf3">
    <div class="new-title">框架<input name="strategy" type="checkbox" value="kpg"></div>
    <div class="formField" style="display:none">
    <div class="row-fluid">
    <div class="span2"><span class="fLabel">文档:</span></div>
    <div class="span10">
    <form:textarea path="channel" id="channel"
    maxlength="200" class="input-xxlarge" rows="4"
    htmlEscape="false"></form:textarea>
    <div style="margin: 4px 0 4px 0;">
    <div style="border:1px dashed #444444" class="span10">

    上面是这样的
    1010011010
    1010011010
    Aug 14, 2017
    6
    善用 f12
    ifreego
    ifreego
    Aug 14, 2017
    7
    自己不要隐藏,
    父级的盒子不要隐藏,
    和背景不一样的 color,
    定位 position 如果是 absolute 要给坐标
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4599 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 06:07 · PVG 14:07 · LAX 22:07 · JFK 01:07
    ♥ Do have faith in what you're doing.