我の代码笔记

August 2, 2019 | 代码本


Strong

strong, b {
    color: #606975;
    font-weight: 700;
    background-color: transparent;
    background-image: linear-gradient(rgba(12,242,143,.2),rgba(12,242,143,.2));
    padding: 3px 8px;
    margin: 0 4px;
    border-radius: 3px;
}

滤镜

background: -webkit-linear-gradient(left,rgba(226,35,18,0.5),rgba(56,181,160,0.5) 100%);

php获取距离天数

<?php

//今天与xxxx年x月xx日相差多少天

$Date_1=date("Y-m-d");

$Date_2="2017-8-26";

$d1=strtotime($Date_1);

$d2=strtotime($Date_2);

$Days=round(($d2-$d1)/3600/24);

echo "今天与xxxx年x月xx日相差".$Days."天";

?>
//屏蔽键盘事件
window.onload = function() {   
    document.onkeydown = function() {
        var e = window.event || arguments[0];
        if (e.keyCode == 123) {//F12
            return false;
        } else if ((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) {//Ctrl+Shift+I
            return false;  
        } else if ((e.shiftKey) && (e.keyCode == 121)) {//Shift+F10
            return false;           
        } else if ((e.ctrlKey) && (e.keyCode == 85)) {return false;}//Ctrl+U
    };
    //屏蔽鼠标右键
    document.oncontextmenu = function() {return false;}
}
//自适应

 <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>

Tags: 代码笔记


AD

评论


仅有一条评论

  1. 七月

    七月 2020-03-21 17:47

    233

    回复