V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Can I use?
http://caniuse.com/
Less
http://lesscss.org
Cool Libraries
Bootstrap from Twitter
Jetstrap
acpp
V2EX  ›  CSS

请教个跟css有关的问题 v2的前端朋友们过来帮下忙

  •  
  •   acpp · 2012-07-18 23:13:09 +08:00 · 2006 次点击
    这是一个创建于 4301 天前的主题,其中的信息可能已经有所发展或是发生改变。
    <div class="main">
    <div class="deal-buy">
    <div class="deal-price-tag"></div>
    <!--{if ($team['state']=='soldout')}-->
    <p class="deal-price"><strong>{$currency}${moneyit($team['team_price'])}</strong><span class="deal-price-soldout"></span></p>
    <!--{elseif $team['close_time']}-->
    <p class="deal-price"><strong>{$currency}${moneyit($team['team_price'])}</strong><span class="deal-price-expire"></span></p>
    <!--{else}-->
    <p class="deal-price"><strong>{$currency}${moneyit($team['team_price'])}</strong><span><a href="${$team['begin_time']<time()?'/team/buy.php?id='.$team['id'] : 'javascript: alert(\'秒杀还未开始...\')'}"><img src="/static/css/i/button-deal-buy_seconds.gif" /></a></span></p>
    <!--{/if}-->
    </div>

    最后一个段落属性,我单独复制了一段css出来 改成了这样

    <p class="deal-pricexx"><strong>{$currency}${moneyit($team['team_price'])}</strong><span><a href="${$team['begin_time']<time()?'/team/buy.php?id='.$team['id'] : 'javascript: alert(\'秒杀还未开始...\')'}"><img src="/static/css/i/button-deal-buy_seconds.gif" /></a></span></p>

    #deal-intro .deal-pricexx span a { display:block; width:120px; height:53px; line-height:53px; margin-top:-13px; outline:0; margin-left: 0px; padding-left: -10px; }

    我想问下,为什么单独弄了一下,没有达到想要的效果呢,是因为这个p属性受div的限制了么?

    -------------------------------------------
    2 条回复    1970-01-01 08:00:00 +08:00
    DaniloSam
        1
    DaniloSam  
       2012-08-22 03:11:37 +08:00
    #deal-intro是哪来的

    别用p来布局,段落就是段落
    gucheen
        2
    gucheen  
       2012-08-22 08:14:00 +08:00
    同上 P标签不要做样式
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   862 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 20:53 · PVG 04:53 · LAX 13:53 · JFK 16:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.