惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
小众软件
小众软件
F
Fortinet All Blogs
爱范儿
爱范儿
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
C
Check Point Blog
博客园 - 聂微东
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
Vercel News
Vercel News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
A
About on SuperTechFans
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog
宝玉的分享
宝玉的分享
Jina AI
Jina AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More

OhYee 博客

小鹏辅助驾驶测评|OhYee 博客 小鹏非支持手机开启自动解锁|OhYee 博客 使用函数计算实现 301 重定向|OhYee 博客 针对 HTML 内容使用 Ant Design 图片弹框|OhYee 博客 博客进程泄露及僵尸进程解决|OhYee 博客 蓝易云服务器体验|OhYee 博客 SSH 调起本地 VSCode|OhYee 博客 【2022 秋招内推】阿里云后端研发工程师|OhYee 博客 使用函数计算获取 IP 地址信息|OhYee 博客 正确获取客户端 IP/HTTP Header 也可能重复|OhYee 博客 评测 Oculus Quest2 及 BigScreen|OhYee 博客 NextJS 热重载保留状态|OhYee 博客 如何优雅地贴 gist 代码|OhYee 博客 Linux 精细化文件权限|OhYee 博客 VSCode 容器开发环境|OhYee 博客 Clash 的不兼容更新排查|OhYee 博客 Zeek 导出 PCAP|OhYee 博客 记一次 ssh 配置问题|OhYee 博客 Git Commit 规范化工具|OhYee 博客 谈谈《星之卡比-探索发现》|OhYee 博客 VSCode 快捷键绑定 Shell 命令|OhYee 博客 ASN.1 语法及 X.509 证书格式解析解析|OhYee 博客 腾讯企业邮箱忽略 MX 记录发信|OhYee 博客 Chrome/Edge 标签组插件|OhYee 博客 【应届内推】阿里云后端研发工程师|OhYee 博客 损坏的 Typecho 备份处理为 JSON|OhYee 博客 VS Code VIM 插件高效使用|OhYee 博客 SSH 正反向代理|OhYee 博客 Let's Encrypt 根证书过期引发的问题|OhYee 博客 OpenWRT 忽略内核依赖|OhYee 博客
给 Hexo 加上 bootstrap 的一些特效 and jquery 实现隐藏功能|
2016-12-09 · via OhYee 博客

这是一篇最后编辑于 8 年前 的文章,其内容可能与目前实际情况差异较大,请注意甄别

查东西的时候看到了 Bootstrap 的特效,觉得非常好看,就像把里面的一些功能加到 Hexo 的 Next 主题里
(有别的主题是自带 Bootstrap 的,不过 Next 已经被修改了好多,不想在折腾了【虽然有折腾了一晚上】)

加了一些好看的标签,同时修改了 Next 自带的 code 标签

效果展示

效果如下:

  • 各种颜色的标签:
  • red
  • sky
  • orange
  • blue
  • green
  • 单行代码框:
  • int num;
  • 按键框
  • Ctrl + A
  • 并且新版的 Next 主题内建标签有了这种 note
  • {% note defult %}deafult{% endnote %}
  • {% note primary %}primary{% endnote %}
  • {% note success %}success{% endnote %}
  • {% note info %}info{% endnote %}
  • {% note warning %}warning{% endnote %}
  • {% note danger %}danger{% endnote %}

然后又顺手重新弄了下 OJ 题目的 CSS (稍微好看了那么一点)
美化完又增加了按键隐藏功能(毕竟题目和代码真长……)

效果如下:

{% raw %}

{% endraw %}

There is a kindom of obsession, so people in this kingdom do things very strictly.

They name themselves in integer, and there are n people with their id continuous (s+1,s+2, ,s+n) standing in a line in arbitrary order, be more obsessively, people with id x wants to stand at yth position which satisfy

x mod y=0

Is there any way to satisfy everyone’s requirement

{% raw %}


{% endraw %}
First line contains an integer T, which indicates the number of test cases.

Every test case contains one line with two integers n, s.

Limits
1≤T≤100.
1≤n≤109.
0≤s≤109.
{% raw %}


{% endraw %}
For every test case, you should output ‘Case #x: y’, where x indicates the case number and counts from 1 and y is the result string.

If there is any way to satisfy everyone’s requirement, y equals ‘Yes’, otherwise y equals ‘No’.
{% raw %}




{% endraw %}
2
5 14
4 11
{% raw %}


{% endraw %}
Case #1: No
Case #2: Yes
{% raw %}



{% endraw %}

{% raw %}

{% endraw %}

There is a kindom of obsession, so people in this kingdom do things very strictly.

They name themselves in integer, and there are n people with their id continuous (s+1,s+2, ,s+n) standing in a line in arbitrary order, be more obsessively, people with id x wants to stand at yth position which satisfy

x mod y=0

Is there any way to satisfy everyone’s requirement

{% raw %}


{% endraw %}
First line contains an integer T, which indicates the number of test cases.

Every test case contains one line with two integers n, s.

Limits
1≤T≤100.
1≤n≤109.
0≤s≤109.
{% raw %}


{% endraw %}
For every test case, you should output ‘Case #x: y’, where x indicates the case number and counts from 1 and y is the result string.

If there is any way to satisfy everyone’s requirement, y equals ‘Yes’, otherwise y equals ‘No’.
{% raw %}




{% endraw %}
2
5 14
4 11
{% raw %}


{% endraw %}
Case #1: No
Case #2: Yes
{% raw %}



{% endraw %}

```cpp 123 http://www.baidu.com 123 #include

#include #include #include #include ```

```cpp 123 http://www.baidu.com 123 #include

#include #include #include #include ```

思路

CSS 部分就是简单的 CSS 代码
只不过是想练下 :after:before
(觉得每次写浮动,都要蛋疼好久)
隐藏和显示则是使用了jquery的一些功能
仔细想一下,其实好久之前就写过这些功能,只不过好久没有碰过,忘完了……

其实就是一个非常简单的选择器的一些操作而已
不过又踩了关于 js 文件加载顺序的坑
如果写jquery函数的话,一定要确保加载完毕(可以在新的文件里写jquery部分)

具体代码

具体代码见文件
/js/My.js
/js/after_jquery.js
/css/My.css

OJ 题目格式使用如下:

<div>
    <div class="oj">   
        <div class="part" title="Description">
            <!--题面-->
        </div>
        <div class="part" title="Input">
            <!--输入解释-->
        </div>
        <div class="part" title="Output">
            <!--输出解释-->
        </div>
        <div class="samp">
            <div class="clear"></div>
            <div class="input part" title="Sample Input">
                <!--样例输入部分-->
            </div>
            <div class="output part" title="Sample Output">
                <!--样例输出-->
            </div>
            <div class="clear"></div>
        </div>
    </div>
</div>