Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 根据文本的节标记宽度高度?_Css_Html_Tags - Fatal编程技术网

Css 根据文本的节标记宽度高度?

Css 根据文本的节标记宽度高度?,css,html,tags,Css,Html,Tags,我再次发布这篇文章,因为没有找到合适的答案。我试着用下面的代码来说明它的工作原理,但不是根据文本的最佳宽度和高度。我设计了三个css id,第一个是#wbp#u row,第二个是#wbp#u col,最后一个是text id name,是#thirdtext I try these codes with html5 and css3 techniques. 我的css代码: #wbp_row { position:relative; display:table; bo

我再次发布这篇文章,因为没有找到合适的答案。我试着用下面的代码来说明它的工作原理,但不是根据文本的最佳宽度和高度。我设计了三个css id,第一个是#wbp#u row,第二个是#wbp#u col,最后一个是text id name,是#thirdtext

I try these codes with html5 and css3 techniques. 
我的css代码:

#wbp_row {
    position:relative;
    display:table;
    border:solid 1px #0F0;
    min-width:auto;
    max-width:960px;
    max-height:auto !important;
    margin: 0 auto;
}
#wbp_col {
    position:relative;
    display:table-row;
    width:320px;
    min-height:auto!important;
    border:1px solid #000;
    float:left;
    margin:0 0 0 0px;
    padding:0;
}
#wbp_row #threedtext {
    font-size:70px;
    max-height:auto !important;
    text-align:center;
    font-family:Arial, Helvetica, sans-serif;
    /*text-shadow: 0px 4px 0px rgba(82,82,82,.80),
             2px 4px 3px rgba(0, 0, 7, 0.50),
             3px 8px 3px rgba(0,0,0,.40),
             0px 12px 10px rgba(0,0,0,0.1);*/
    color: rgba(141, 198, 63, 1);
    padding:0;
    line-height:normal;
    overflow:auto;
    position:relative;
    border:1px solid #F00;
}
HTML代码:

<section id="wbp_row">
<Section id="wbp_col">
    <p id="threedtext">Web</p>
</Section>
<!--Cols codes end-->
<Section id="wbp_col">
    <p id="threedtext">Brand</p>
</Section>
<!--Cols codes end-->
<Section id="wbp_col">
    <p id="threedtext">Print</p>
</Section>
<!--Cols codes end-->

Web

品牌

打印


只需写下css规则:


只需删除宽度:320px
#wbp_col

然后

添加
宽度:自动
#wbp\U列


然后将
边距:0
#wbp#u row#threedtext

你的问题是什么?“我再次发布这篇文章,因为没有找到合适的答案。”-不要这样做。通过编辑来改进现有问题和/或赢得足够的声誉以提供悬赏。谢谢@era。。。。您的上述代码可以正常工作并删除bug
#wbp_row #threedtext { 
  margin:0; 
}
#wbp_col {
  position:relative;
  display:table-row;
  width:320px;
  min-height:auto!important;
  border:1px solid #000;
  clear:both;
  margin:0 0 0 0px;
  padding:0;
}