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

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

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

    如下

    <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 条回复    2017-08-14 09:49:01 +08:00
    lzhr
        1
    lzhr  
       2017-08-14 02:24:28 +08:00
    css 呢
    TabGre
        2
    TabGre  
       2017-08-14 07:01:41 +08:00
    没有 CSS 怎么判断呀?最好上 codepen 等在线展示下,没有上下文,是在帮不上忙
    ys0290
        3
    ys0290  
       2017-08-14 08:18:06 +08:00 via iPhone
    代码里写了却没显示,要 css 一起看的
    guyeuro
        4
    guyeuro  
    OP
       2017-08-14 08:22:25 +08:00
    @TabGre

    前后文很多啊,上面还有多层 div,怎么展示?
    这种 p 文字不显示的情况有哪些可能?
    guyeuro
        5
    guyeuro  
    OP
       2017-08-14 08:34:04 +08:00
    <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
        6
    1010011010  
       2017-08-14 08:57:09 +08:00
    善用 f12
    ifreego
        7
    ifreego  
       2017-08-14 09:49:01 +08:00
    自己不要隐藏,
    父级的盒子不要隐藏,
    和背景不一样的 color,
    定位 position 如果是 absolute 要给坐标
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5745 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 03:05 · PVG 11:05 · LAX 20:05 · JFK 23:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.