注册 登录
编程论坛 WEB前端(UI)

padding-top的使用问题

跆拳勇士 发布于 2018-03-24 18:43, 2742 次点击
红色文字处是我的问题,希望有大牛能为我解惑。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
    *{
        margin:0;
        padding:0;
    }
    .product{
        width:1100px;
        height:700px;
        border:1px solid orange;
        margin:0 auto;
    }
    .product ul
    {
        list-style:none;
    }
    .product ul li
    {
        float:left;
        border:1px solid #F00;
        padding:3px 8px;
        margin:3px;
    }
    .product p span{
        color:orange;
        font-weight:bold;
        
        
    }
    .product p b{
        font-weight:normal;
        padding-top:10px;  此处的padding-top在网页中怎么没有效果
        
        
   
    }
    .product p i{
        font-style:normal;
        font-size:12px;
        color:red;
        
    }
    .product .left{
        float:left;
    }
    .product .right{
        float:right;
    }
</style>
</head>

<body>
</body>
<div class="product">
    <ul>
        <li>
            <img src="C:\Users\Administrator\Desktop\002.jpg" alt="色卡"/>
            <p>
                <span>&yen;588.00</span><br />
                <b>描述信息</b><br />
                <i>已售333件</i><br />
                <i >婴儿用品</i> <i >北京</i>
               
            </p>
            
        </li>
        <li>
            <img src="C:\Users\Administrator\Desktop\002.jpg" alt="色卡"/>
            <p>
                <span>&yen;588.00</span><br />
                <b>描述信息</b><br />
                <i>已售333件</i><br />
                <i >婴儿用品</i> <i >北京</i>
               
            </p>
            
        </li>
        <li>
            <img src="C:\Users\Administrator\Desktop\002.jpg" alt="色卡"/>
            <p>
                <span>&yen;588.00</span><br />
                <b>描述信息</b><br />
                <i>已售333件</i><br />
                <i>婴儿用品</i> <i>北京</i>
               
            </p>
            
        </li>
        <li>
            <img src="C:\Users\Administrator\Desktop\002.jpg" alt="色卡"/>
            <p>
                <span>&yen;588.00</span><br />
                <b>描述信息</b><br />
                <i>已售333件</i><br />
                <i>婴儿用品</i> <i>北京</i>
               
            </p>
            
        </li>

    </ul>
   
</div>
</html>


[此贴子已经被作者于2018-3-24 18:44编辑过]

2 回复
#2
yunxi1232018-06-29 17:49
给b加一个display:block就好了
#3
南城无风2018-07-15 16:59
b标签是行内标签,行内标签只能设置margin-left和right吧
1