首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

样式表定义中有一行代码不明白,请解释一下解决思路

2012-03-12 
样式表定义中有一行代码不明白,请解释一下stylebody{text-align:center}.txt{width:500pxheight:1pxo

样式表定义中有一行代码不明白,请解释一下
<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>

热点排行