调用bing壁纸

发布于 2018-06-15  1.45k 次阅读


 调用每日必应搜索背景-每日必应壁纸API

必应搜索的背景每天都有更换,而且美感也是没得说的!前段时间看别的博客,有调用必应背景的,然后百度一下,发现有提供接口!

图片尺寸比较大,你可以用来做网页背景,当然,也可以定义一下他的长宽高!

看下面代码

方法1:

<img class="alignnone" src="https://www.caojiefeng.com/api/bing/1920.php" alt="" width="1920" height="1080" />

方法2:

<style type="text/css"> 
BODY { 
background: url(https://www.caojiefeng.com/api/bing/1920.php) 
} 
</style>

 

方法3:

<body style="background-image: url(https://www.caojiefeng.com/api/bing/1920.php);background-attachment: fixed;background-repeat: no-repeat;background-size: cover;-moz-background-size: cover;">

或者:

<style>
body{
background:#ecedf0 url("https://www.caojiefeng.com/api/bing/1920.php") fixed;
background-repeat:no-repeat;
background-size:100% 100%;}
img.logo{width:14px;height:14px;margin:0 5px 0 3px;}
.onclick{cursor: pointer;touch-action: manipulation;}
</style>

来源:https://www.caojiefeng.com/php/10.html

一只想要翻身的咸鱼,