dppcyt6157 2014-05-16 09:57
浏览 42
已采纳

需要帮助使我的新css功能仅适用于一个页面

im using KOSE Html template, i changed the opening page, so that the content doesn't display on the right when you first click onto the site, but only shows once you have click the "x" to display it.

Since i have done this it seems to have made the same effect on all of the pages, when i only want it on the Home page

this is the guide i followed,

Add the below CSS to your page:

#content-container{
  display:none;
}

For conformity, also add class="rotated to your hide-toggle-button link in your HTML:

<a href="index.php.html#" id="hide-toggle-button" class="rotated"><i class="icon ion-ios7-close-empty"></i></a>

but it changes every page, please can you help

I much appreciate it!

thanks

  • 写回答

1条回答 默认 最新

  • dpea85385 2014-05-16 10:05
    关注

    If you want it to only work in the current page add the following code in your home page <head> tags:

    <style>   
    #content-container{
      display:none;
    }
    </style>
    

    The CSS priority is like this:
    - External .CSS File
    -- <style> Tag
    --- Inline style Attribute.

    This means overwrites the stuffs written in the .CSS file for a certain page, in order to achieve what you wanted.

    I hope this helped you.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部