日期:2014-05-17  浏览次数:20729 次

样式表定义中有一行代码不明白,请解释一下
<style>
body{
    text-align:center;
    }

.txt{
    width:500px;
    height:1px;
    overflow-y:visible;
    text-align:left;
    font-size:12px;
    line-height:18px;
    border:3px   solid   gray;
    border-width:0   3px;
    padding:5px;
    }

.txt   p{
    /*text-indent:24px;*/
    text-indent:2em; /*首行缩进*/
    word-wrap:   break-word;
    word-break:   break-all;
    }

</style>

其中的   .txt   p{   我不明白,txt和p之间有一个空格,这种定义是什么意思。查些资料也找不到答案。

------解决方案--------------------
选择符txt下的所有p标签的样式
------解决方案--------------------
class=txt的元素内的p

<div class= "txt ">
<p> 这个 </p>
</div>