首页 » 代码分享

关于 代码分享 的文章共有25条

简单的返回顶部特效

简单的返回顶部特效

首先引入jQuery js代码如下 $(function(){         //当滚动条的位置处于距顶部100像素以下时,跳转链接出现,否则消失         $(function () {             $(window).scroll(function(){                 if ($(window).scrollTop()>100){                     $("#backtop").css("bottom","1px");                 }                 else                 {              &n...

评论(0) 2023-5-24
免费生成网站缩略图

免费生成网站缩略图

在blinky 可以生成4种格式的网站缩略图 来个实例 64x64:http://blinky.nemui.org/shot/small?http://www.isiyuan.net 128x128:http://blinky.nemui.org/shot?http://www.isiyuan.net 256x256:http://blinky.nemui.org/shot/large?http://www.isiyuan.net 512x512:http://blinky.nemui.org/shot/xlarge?http://www.isiyuan.net 不过这个只可以生成一种设备的 分享一下以前写的一个小程序PHP的 点我生成多设备缩略图

评论(3) 2023-5-21
4月4日网站自动变黑白js和php代码分享

4月4日网站自动变黑白js和php代码分享

为表达对抗新冠状疫情战斗牺牲烈士和逝世同胞的深切哀悼 国务院公告2020年4月4日将举行全国性哀悼活动,网站建议大家修改成黑白色,给大家分享一段代码,直接放在网站的</head>前面即可,在明天网站自动变成黑白色。 js代码需要网站支持jq才可以运行 <script> $(function() {     var myDate = new Date;     var date = myDate.getDate();      console.log(date);     if(date==4){         $("#heibai").html("html{-webkit-filter:grayscale(100%);-moz-filter:grayscale(100%);-ms-filter:grayscale(100%);-o-filter:grayscale(100%)}");     } }) </script> <style id="heibai"></style> php代码 需要支持php即可运行 <?php if(date("m/d")=='04/04'):?> <style>html{-webkit-filter:grayscale(100%);-moz-filter:grayscale(100%);-ms-filter:grayscale(100%);-o-filter:grayscale(100%)}</style> <?php endif?> 原理就是用到了一个css滤镜,给需要的站长 使用效果: 幸得有你,山河无恙,向抗击疫情的英雄们致敬!

评论(0) 2023-5-20
资源网如何增加小刀同款段落标题样式

资源网如何增加小刀同款段落标题样式

资源网如何增加小刀娱乐网同款段落标题样式 其实这个就是十分简单的,我们只需要增加css样式即可完成 .art-content h3{position:relative;padding:5px 0 15px;color:#424242;font-size:18px;display:-webkit-inline-box;border-bottom:1px solid #fff;cursor:pointer;z-index:16;font-weight:700;line-height:30px} .art-content h4{font-size: 18px;font-weight: 700;margin: 25px 0 20px;border-left: 4px solid #1b54bc;padding: 0 0 0 10px;line-height: 17px;} .art-content h5{font-size:18px;color:#333;background:#e2e2e2;padding:5px 10px;margin:0 0 15px;font-weight:600} .art-content h6{font-size:18px;color:#fff;background:#5c9dfd;padding:5px 10px;margin:0 0 15px;font-weight:600} .art-content h3:before{position:absolute;top:35px;left:0;z-index:-1;width:45%;height:2px;background:#1b54bc;content:" ";border-radius:20px;transition:all .5s} .art-content h3:hover:before{width:100%;transition:all .5s} 使用方法art-content替换成自己文章的div的class类名,然后发布文章选择h3 h4 h5 h6标题即可,也可以手动输入<h3>H3标题样式</h3>

评论(0) 2020-7-12