dppcyt6157 2014-05-16 17: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 18: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.

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

报告相同问题?

悬赏问题

  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题