avada主题,wordpress中fontawesome字体不显示Access to font at ~from origin

Access to font at ~from origin has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Failed to load resource: net::ERR_FAILED

解决方法 :
.htaccess 文件尾部增加

# Apache config
<FilesMatch ".(eot|ttf|otf|woff)">
 Header set Access-Control-Allow-Origin "*"
</FilesMatch>

文章来源参考:https://theme-fusion.com/documentation/avada/how-to/fix-missing-font-awesome-icons-or-custom-fonts/

网站上的设计类网站虚拟水印去除

网站上的设计类网站虚拟水印去除,这是国外的一个网站,就不公布具体网址了,提供思路:
Chrome的插件:Download All Images 用它来找到水印的文件名。
网页另存,找到对应的 CSS文件 ,用sublime一次打开,搜索全部打开文件 ,找到对应的文件名的CLASS或ID。
然后控制它。

document.getElementById("watermark").style.backgroundImage ="url('')";
document.getElementById("bg").style.backgroundImage ="url('')";
document.getElementsByClassName("preview")[0].style.backgroundImage ="url('')";

WIN10用powershell命令行中操作MYSQL数据库

我用的PhpStudy搭的环境,MYSQL目录为:D:\phpstudy_pro\Extensions\MySQL8.0.12\bin
进入此目录
按着Shift右键在空白处点击,如下图:

.\mysql mysql -u root -p

回车后输入密码,即进入MYSQL命令行操作。

SHOW DATABASES;

显示数据库

create database lunji;

创建数据库lunji

javascript判断当前网址,来实现html中的right here的功能

 

            let nowUrl=this.location.pathname;
            //alert("Now page url:"+nowUrl);
            for(let i=0;i<navDom.length;i++){
                let linkUrl=navDom[i].getElementsByTagName("a")[0].getAttribute("href");
                if(nowUrl.indexOf(linkUrl)>0){
                    navDom[i].classList.replace("nav-item","active");
                }
                //alert(linkUrl);
            }

 

示例