一个洛谷Material化的Stylish美化主题

博客介绍了洛谷的两个主题——Luogu Argon Design和Luogu Material,重点是Luogu Material,这是一个遵循Material Design风格的洛谷主题。作者提供了主题的stylish链接,并鼓励用户提出问题。

Luogu Argon Design

新主题 Luogu Argon Design 目前已经取代了 Luogu Material,但这并不代表 Luogu Material 会停止更新,在 Luogu 4 完成后 Luogu Material 和 Luogu Argon Design 都将要被重写。

 

 

Luogu Material

一个将洛谷Material Design化的主题。

发布在stylish上,地址:https://userstyles.org/styles/157651/material-luogu-material

欢迎发送issue

截图

代码

最新代码请到stylish主题页面查看。https://userstyles.org/styles/157651/material-luogu-material

@-moz-document url-prefix("https://www.luogu.org"), url-prefix("http://www.luogu.org")
{
/*ripple效果*/
  button
  {
    opacity: 0.9;
    line-height: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    outline: none;
    background-color: white;
    text-decoration: none;
    position: relative;
    border-radius: 3px;
    box-shadow: 0 1px 3px darkgray;
    transition: box-shadow 0.5s ease-out;
  }

  button::before
  {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 10%/40%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    height: 100%;
    width: 100%;
    z-index: -1;
    -webkit-transition: all 0.5s cubic-bezier(0.23, 0.95, 0.56, 1);
    transition: all 0.5s cubic-bezier(0.23, 0.95, 0.56, 1);
  }

  button:hover
  {
    box-shadow: 0 6px 16px darkgray;
    transition: all 0.8s ease-out;
  }

  button:active
  {
    opacity: 1;
    -webkit-transition: all 0.5s ease-out;
    transition: all 0.3s ease-out;
  }

  button:active::before
  {
    width: 0;
    height: 100%;
    border-radius: 0;
    background-color: rgba(0, 0, 0, .4);
    -webkit-transition: all 0.01s ease-out;
    transition: all 0.01s ease-out;
  }

  button.link
  {
    background: none;
    color: #0275d8;
    box-shadow: none;
  }

  button[disabled]
  {
    background-color: lightgray;
    color: darkgray;
    cursor: not-allowed;
    box-shadow: none;
  }

  .circle
  {
    border-radius: 100%;
  }

  button.circle
  {
    padding: 0;
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
    box-shadow: 0 6px 12px rgba(0,0,0,0.9);
  }

  button.circle:hover
  {
    box-shadow: 0 12px 24px rgba(0,0,0,0.9);
  }

  button.circle::before
  {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 100%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    height: 100%;
    width: 100%;
    z-index: -1;
    -webkit-transition: all 0.5s cubic-bezier(0.23, 0.95, 0.56, 1);
    transition: all 0.5s cubic-bezier(0.23, 0.95, 0.56, 1);
  }

  button.circle:active::before
  {
    width: 0;
    height: 0;
    border-radius: 100%;
    background-color: rgba(0, 0, 0, .4);
    -webkit-transition: all 0.01s ease-out;
    transition: all 0.01s ease-out;
  }
/*透明度*/
  .lg-article, .lg-article-sub, .lg-article-nctrl ,.CardHyaline ,.am-panel, .lg-summary ,.am-g.lg-table-row.lg-table-bg0
  {
    background: rgba(255,255,255,/*[[CardHyaline]]*/);
  }
/*背景*/
  .lg-content
  {
    /*[[UseBackground]]*/
    background: url(/*[[BackgroundImg]]*/) fixed center;
    background-size: cover;
    background-attachment: fixed;
  }
/*主题色*/ 
  .lg-header, .lg-header-list>li
  {
    background-color: /*[[ThemeColor]]*/!important;
    border-color: /*[[ThemeColor]]*/!important;
  }

  .lg-fg-bluelight
  {
    color: /*[[ThemeColor]]*/!important;
  }

  .am-btn-primary
  {
    background-color: /*[[ThemeColor]]*/;
    border-color: /*[[ThemeColor]]*/;
  }

  a
  {
    color: /*[[ThemeColor]]*/;
  }

  .am-pagination>.am-active>a, .am-pagination>.am-active>a:focus, .am-pagination>.am-active>a:hover, .am-pagination>.am-active>span, .am-pagination>.am-active>span:focus, .am-pagination>.am-active>span
  {
    background-color: /*[[ThemeColor]]*/;
    border-color: /*[[ThemeColor]]*/;
  }

  .lg-sub-article .am-btn,.lg-article-sub .am-btn
  {
    border: none !important;
  }
/*-----------------*/
/*滚动条*/
  ::-webkit-scrollbar
  {
    width: 6px;
    height: 10px;
    background-color: rgba(0, 0, 0, 0);
  }

  ::-webkit-scrollbar-track
  {
    background-color: rgba(0, 0, 0, 0.1);
  }

  ::-webkit-scrollbar-thumb
  {
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    -moz-transition: all 0.4s ease;
               /* Firefox 4 */
    -webkit-transition: all 0.4s ease;
               /* Safari 和 Chrome */
    -o-transition: all 0.4s ease;
               /* Opera */;
  }

  ::-webkit-scrollbar-thumb:hover
  {
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    -moz-transition: all 0.4s ease;
               /* Firefox 4 */
    -webkit-transition: all 0.4s ease;
               /* Safari 和 Chrome */
    -o-transition: all 0.4s ease;
               /* Opera */;
  }

  .animated
  {
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    animation-fill-mode: both;
  }
/*--------------*/
  .lg-article, .lg-article-sub, .lg-article-nctrl, .lg-summary, .lg-table-row,.lg-article.am-g , .am-comment-main
  {
/*上浮动画*/
    -webkit-animation: fadeInUp 0.5s cubic-bezier(.215,.61,.355,1);
  }

  .lg-toolbar
  {
/*副标题动画*/
    -webkit-animation: fullDown 0.5s cubic-bezier(0.18, 0.89, 0.33, 0.99);
  }

  .lg-mcard
  {
/*名字标签*/
    display: inline-block;
    min-width: 10px;
    font-size: 1.2rem;
    line-height: 1;
    vertical-align: top;
    box-shadow: 0 2px 2px rgba(0,0,0,0.2);
    border: 0;
    border-radius: 2px;
    transition: all 0.3s;
  }

  .lg-mcard .lg-mcard-username
  {
    display: block;
    padding: .25em .625em;
    text-align: center;
    font-weight: 700;
    border-radius: 2px 2px 0px 0px;
    color: #fff;
  }

  .lg-mcard:hover
  {
    min-width: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: scale(1.03);
    -ms-transform: scale(1.03);
 /* Internet Explorer */
    -moz-transform: scale(1.03);
 /* Firefox */
    -webkit-transform: scale(1.03);
 /* Safari 和 Chrome */
    -o-transform: scale(1.03);
 /* Opera */;
  }
/*阴影&动画*/
  .am-btn:hover
  {
   /* box-shadow: 0 2px 10px rgba(0,0,0,0.4);*/
    box-shadow: 0 3px 12px rgba(0,0,0,0.4);
  }

  botton,.am-btn,botton:active, botton:hover,.am-btn:active,botton:focus
  {
    color: 0;
    border: 0px !important;
    outline: none !important;
  }

  .am-badge.am-radius:hover
  {
    min-width: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: scale(1.03);
    -ms-transform: scale(1.03);
 /* Internet Explorer */
    -moz-transform: scale(1.03);
 /* Firefox */
    -webkit-transform: scale(1.03);
 /* Safari 和 Chrome */
    -o-transform: scale(1.03);
 /* Opera */;
  }

  .am-badge.am-radius
  {
    transition: all 0.3s;
  }

  a
  {
    transition: all 0.3s;
  }

  .lg-article, .lg-article-sub, .lg-article-nctrl , .lg-summary
  {
/*首页卡片,题目侧栏*/
    border-radius: 6px;
    box-shadow: 0 3px 3px rgba(0,0,0,0.15);
    transition: all 0.25s ease-in-out;
  }

  .lg-article:hover ,.lg-article-sub.am-g:hover
  {
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  }

  .lg-article:active,.lg-article-sub.am-g:active
  {
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  }

  .lg-summary:hover
  {
    box-shadow: 0 3px 7px rgba(0,0,0,0.2);
  }

  .lg-summary:active
  {
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
  }

  .lg-table-row
  {
/*题目列表*/
    border-radius: 5px;
    box-shadow: 0 2px 2px rgba(0,0,0,0.15);
    transition: all 0.25s ease-in-out;
    -webkit-animation: fadeInUp 0.5s cubic-bezier(0,0,0.58,1);
  }

  .lg-table-row:hover
  {
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }

  .lg-table-row:active
  {
    box-shadow: 0 2px 15px rgba(0,0,0,0.4);
  }

  .am-comment-hd
  {
/*对话和犇犇框*/
    border-radius: 5px 5px 0px 0px;
  }

  .am-comment-bd
  {
    border-radius: 0px 0px 5px 5px;
  }

  .am-comment-main
  {
    border-radius: 5px;
  }

  .lg-header
  {
/*顶栏*/
    box-shadow: 0 2px 3px rgba(0,0,0,0.2);
  }

  #lg-offcanvas
  {
/*侧栏*/
    box-shadow: 0 2px 7px rgba(0,0,0,0.4);
  }

  .am-sticky-placeholder
  {
/*页面标题顶栏*/
    box-shadow: 0 1px 0.2px rgba(0,0,0,0.05);
  }

  .am-btn
  {
/*按钮*/
    border: 0;
    border-radius: 3px;
    box-shadow: 0 2px 7px rgba(0,0,0,0.3);
    margin-bottom: 3px;
    transition: all 0.25s ease-in-out;
    margin-right: 1px;
    margin-left: 1px;
  }

  .am-btn:active
  {
  /*  box-shadow: 0 2px 15px rgba(0,0,0,0.42);*/
    box-shadow: 0 3px 18px rgba(0,0,0,0.4);
  }

  .am-btn-primary:focus, .am-btn-primary:hover, .am-btn-primary
  {
    border: none;
  }

  .am-nav-tabs>li.am-active>a, .am-nav-tabs>li.am-active>a:focus
  {
/*多Tab栏*/
    color: /*[[ThemeColor]]*/;
    background-color: rgba(255,255,255,0);
    border: 0px;
    border-bottom: 2px solid /*[[ThemeColor]]*/;
    cursor: default;
  }

  .am-nav-tabs>li.am-active>a:hover
  {
    color: /*[[ThemeColor]]*/;
    background-color: rgba(0,0,0,0.05);
    border: 0px;
    border-bottom: 2px solid /*[[ThemeColor]]*/;
    cursor: default;
  }

  .am-nav>li>a
  {
    color: /*[[ThemeColor]]*/;
    background-color: rgba(0,0,0,0.0);
    border: 0;
    border-bottom: 2px solid rgba(0,0,0,0);
    cursor: default;
  }

  .am-nav-tabs
  {
    border: 0;
  }

  .am-tabs-bd
  {
    border: 0px;
    border-top: none;
    background: rgba(0,0,0,0) !important;
  }

  .feed-selector.am-active>a
  {
/*Tab选择栏激活状态*/
    background-color: rgba(255,255,255,0) !important;
    color: /*[[ThemeColor]]*/ !important;
    border-bottom: 3px solid /*[[ThemeColor]]*/;
    border-radius: 4px 4px 0px 0px;
  }

  .feed-selector.am-active>a:hover
  {
    background-color: rgba(0,0,0,0.08) !important;
    color: /*[[ThemeColor]]*/ !important;
  }

  .feed-selector.am-active>a:active
  {
    background-color: rgba(0,0,0,0.15) !important;
    color: /*[[ThemeColor]]*/ !important;
  }

  .feed-selector.am-active>a:focus
  {
    background-color: rgba(255,255,255,0.15) !important;
    color: /*[[ThemeColor]]*/ !important;
    border-bottom: 3px solid /*[[ThemeColor]]*/ !important;
    border-radius: 4px 4px 0px 0px !important;
  }

  .feed-selector>a
  {
/*Tab选择栏未激活状态*/
    background-color: rgba(255,255,255,0);
    color: /*[[ThemeColor]]*/;
    border-bottom: 0px solid /*[[ThemeColor]]*/;
  }

  .feed-selector>a:hover
  {
    background-color: rgba(0,0,0,0.08);
    color: /*[[ThemeColor]]*/;
  }

  .feed-selector>a:active
  {
    background-color: rgba(0,0,0,0.15);
    color: /*[[ThemeColor]]*/;
  }

  .feed-selector>a:focus
  {
    background-color: rgba(255,255,255,0);
    color: /*[[ThemeColor]]*/;
    border-bottom: 0px solid /*[[ThemeColor]]*/;
    border-radius: 4px 4px 0px 0px;
  }

  .am-modal-dialog
  {
/*对话框阴影*/
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    border-radius: 8px;
  }

  .am-modal-footer
  {
    border-radius: 0px 0px 8px 8px;
  }

  .am-nav>li>a
  {
/*顶栏按钮*/
    transition: all 0.3s;
  }

  .am-topbar-nav>li>a:after
  {
    display: none;
  }

  .am-pagination>li>a, .am-pagination>li>span
  {
/*页码*/
    box-shadow: 0 2px 2px rgba(0,0,0,0.2);
    border: none;
    transition: all 0.25s;
  }

  .am-pagination>li>a:hover
  {
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  }

  .am-pagination>li>span:hover
  {
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  }

  .am-form input[type=number], .am-form input[type=search], .am-form input[type=text], .am-form input[type=password], .am-form input[type=datetime], .am-form input[type=datetime-local], .am-form input[type=date], .am-form input[type=month], .am-form input[type=time], .am-form input[type=week], .am-form input[type=email], .am-form input[type=url], .am-form input[type=tel], .am-form input[type=color], .am-form select, .am-form textarea, .am-form-field
  {
/*输入栏*/
    border: none;
    border-bottom: 2px solid /*[[ThemeColor]]*/;
    background-color: rgba(0, 0, 0, 0);
  }

  #topbar-search-text
  {
/*顶栏搜索栏特殊处理*/
    border-radius: 5px 0px 0px 5px;
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0);
    color: rgba(255,255,255,255);
    text-shadow: none;
    box-shadow: none;
  }

  #topbar-search-text::-webkit-input-placeholder
  {
    color: rgba(255, 255, 255, 0.7);
  }/*针对不同浏览器改变hint颜色*/
  #topbar-search-text::-moz-input-placeholder
  {
    color: rgba(255, 255, 255, 0.7);
  }

  #topbar-search-text::-ms-input-placeholder
  {
    color: rgba(255, 255, 255, 0.7);
  }

  #topbar-search-text:-webkit-autofill,select:-webkit-autofill
  {
/*去内部阴影*/
    -webkit-box-shadow: 0 0 0px 1000px white  inset !important;
  }

  #topbar-search
  {
/*顺便把搜索按钮也处理下*/
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0);
    border-radius: 0px 5px 5px 0px;
  }

  .am-dropdown-content
  {
/*展开菜单*/
    border: 0px solid #ddd;
    border-radius: 4.5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  }

  .tip-twitter
  {
/*鼠标停留提示*/
    border: 0px;
    border-radius: 50px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .am-dropdown-content:before
  {
    display: none;
  }

  .am-dropdown-content:after
  {
    display: none;
  }

  .am-input-group-label
  {
/*输入框图标提示*/
    color: /*[[ThemeColor]]*/;
    border: none;
    border-bottom: 2px solid /*[[ThemeColor]]*/;
    background-color: rgba(0, 0, 0, 0);
  }

  .am-input-group-danger .am-input-group-label
  {
/*题目列表侧栏搜索按钮*/
    background: rgba(255,255,255,0);
  }

  .am-input-group-danger .am-input-group-label
  {
    color: #dd514c;
    border: none;
    border-bottom: 2px solid #dd514c;
    background-color: rgba(0, 0, 0, 0);
  }

/*--------------------------------------------------------------------*/
  .lg-record-tile
  {
/*信息色块(如评测结果页面测试点信息)*/
    box-shadow: 0 2px 6px rgba(0,0,0,0.32);
    transition: all 0.4s cubic-bezier(.215,.61,.355,1);
  }

  .lg-record-tile:hover
  {
    box-shadow: 0 2px 15px rgba(0,0,0,0.35);
    min-width: 10px;
    transform: scale(1.08);
    -ms-transform: scale(1.08);
 /* Internet Explorer */
    -moz-transform: scale(1.08);
 /* Firefox */
    -webkit-transform: scale(1.08);
 /* Safari 和 Chrome */
    -o-transform: scale(1.08);
 /* Opera */;
  }

  .lg-record-tile:active
  {
    box-shadow: 0 4px 33px rgba(0,0,0,0.4);
  }

  .lg-training-out
  {
/*试炼场内容块*/
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.25s ease-in-out;
  }

  .lg-training-out:hover
  {
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  }

  .lg-training-out:active
  {
    box-shadow: 0 2px 25px rgba(0,0,0,0.25);
  }

  .lg-sub-article
  {
/*展开内容块*/
   /* box-shadow: 0 2px 4px rgba(0,0,0,0.2);*/
    transition: all 0.25s ease-in-out;
    background-color: #eeeeee;
    border-radius: 5px;
  }

  .am-panel
  {
/*首页内容块(如近期比赛)*/
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.25s ease-in-out;
    margin-bottom: 8px;
  }

  .am-panel:hover
  {
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  }

  .am-panel:active
  {
    box-shadow: 0 2px 25px rgba(0,0,0,0.25);
  }

  .am-comment-main
  {
/*对话内容*/
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.25s ease-in-out;
    border-radius: 5px;
  }

  .am-comment-main:hover
  {
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  }

  .am-comment-main:active
  {
    box-shadow: 0 2px 25px rgba(0,0,0,0.25);
  }

  .am-comment-primary .am-comment-avatar, .am-comment-primary .am-comment-main
  {
    border: none;
  }

  .comment-main:before
  {
    border: none;
  }

  .comment-main:after
  {
    border: none;
  }

  .am-comment-main:before
  {
    border: none;
  }

  .am-comment-main:after
  {
    border: none;
  }

  .am-panel-success
  {
    border: none;
  }

  .am-panel-secondary
  {
    border: none;
  }

  .lg-training-out
  {
    border: none;
  }

  .am-comment-main
  {
    border: none;
  }

  .am-panel
  {
    border: none;
  }

  .am-progress
  {
/*进度条*/
    overflow: hidden;
  /*  height: 6px;*/
    margin-bottom: 2rem;
    background-color: #f5f5f5;
    border-radius: 0;
    color: /*[[ThemeColor]]*/;
    -webkit-box-shadow: none;
    box-shadow: none;
  }

  .am-badge.am-radius
  {
/*标签*/
    border-radius: 50px;
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .lg-unread
  {
/*私信弹框*/
    border: 0px;
    border-radius: 8px;
    background: /*[[ThemeColor]]*/;
    box-shadow: 0 3px 15px rgba(0,0,0,0.3);
    transition: all 0.25s ease-in-out;
  }

  .lg-unread:hover
  {
    box-shadow: 0 3px 17px rgba(0,0,0,0.4);
  }

  .lg-unread:active
  {
    box-shadow: 0 3px 25px rgba(0,0,0,0.4);
  }
/*----------------*/
/*动画定义*/
@  -webkit-keyframes fadeInUp
  {
    from {
    opacity: 0.25;
    -webkit-transform: translate3d(0, 80px, 0);
    transform: translate3d(0, 80px, 0);
  }

  to
  {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInUp
{
  from
  {
    opacity: 0.25;
    -webkit-transform: translate3d(0, 80px, 0);
    transform: translate3d(0, 80px, 0);
  }

  to
  {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

.fadeInUp
{
  -webkit-animation-name: fadeInUp;
  animation-name: fadeInUp;
}

/*--------*/
@-webkit-keyframes fullDown
{
  from
  {
    opacity: 0.8;
    -webkit-transform: translate3d(0, -50px, 0);
    transform: translate3d(0, -50px, 0);
  }

  to
  {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fullDown
{
  from
  {
    opacity: 0.8;
    -webkit-transform: translate3d(0, -50px, 0);
    transform: translate3d(0, -50px, 0);
  }

  to
  {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
}

.fullDown
{
  -webkit-animation-name: fullDown;
  animation-name: fullDown;
}
}

@-moz-document url("https://www.luogu.org/"), url("http://www.luogu.org/"), url-prefix("https://www.luogu.org/#"), url-prefix("http://www.luogu.org/#")
{
/*主页姓名颜色*/
  .am-u-md-4.lg-punch.am-text-center h2 a
  {
    /*[[NameColor]]*/;
  }
}

  

转载于:https://www.cnblogs.com/abc2237512422/p/8652127.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值