固定表示目次(プラグイン「contents」、CSS 使用)


目次

題名1

題名2

小題名2-1

編集中入力内容

#divclass(contents_opacity_1){&font(b,150%){目次}}
#divclass(contents_hover){&font(b,150%){目次}
#contents(level=1,fromhere=true)}

CSS記述内容

  1. /* 目次固定表示(プラグイン、js抜き) */
  2. /* ホバー前での表示 */
  3. .contents_hover {
  4. position: fixed;/* 固定表示化 */
  5. opacity: .15;/* 半透明化 */
  6. width: 190px;
  7. height: 26px;
  8. top: 124px;
  9. right: 0;
  10. padding: 5px;
  11. border-radius: 4px;
  12. overflow-y: hidden;
  13. background-color: #d1d1d1;
  14. transition-delay: .1s;
  15. transition-duration: .5s;
  16. transition-timing-function: ease-in-out;
  17. z-index: 14;
  18. }
  19. /* ホバー時の表示 */
  20. .contents_hover:hover {
  21. opacity: 1;
  22. height: 504px;
  23. overflow-y: auto;
  24. }
  25. /* ホバー前の「目次」を濃くするため */
  26. .contents_opacity_1 {
  27. position: fixed;
  28. opacity: 1;
  29. width: 190px;
  30. height: 26px;
  31. top: 124px;
  32. right: 0;
  33. padding: 5px;
  34. border-radius: 4px;
  35. background-color: #d1d1d1;
  36. z-index: 13;
  37. }
  38.  

タグ:

+ タグ編集
  • タグ:
最終更新:2022年06月09日 20:18