加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
newtab.html 7.07 KB
一键复制 编辑 原始数据 按行查看 历史
Tim-Paik 提交于 2022-01-17 23:12 . clear history
<!DOCTYPE html><html lang="zh"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="Description" content="新标签页"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="theme-color" content="#00897b"><meta name="referrer" content="never"><link rel="shortcut icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 226 226'%3E%3Cdefs%3E%3ClinearGradient x1='198.753' y1='82.744' x2='75.894' y2='33.975' gradientUnits='userSpaceOnUse' id='a'%3E%3Cstop offset='0' stop-color='%23008c7b'/%3E%3Cstop offset='1' stop-color='%2300a692'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='none' stroke-miterlimit='10' font-family='none' font-weight='none' font-size='none' text-anchor='none' style='mix-blend-mode:normal'%3E%3Cpath d='M0 226V0h226v226z'/%3E%3Cpath d='M207.167 47.083V84.75H89.458V37.667H197.75c5.18 0 9.417 4.237 9.417 9.416z' fill='url(%23a)'/%3E%3Cpath d='M179.675 70.625a9.414 9.414 0 0 1-8.174-4.746l-13.41-23.471a9.44 9.44 0 0 0-8.182-4.741H94.167v32.958z' fill='%2300bfa8'/%3E%3Cpath d='M114.996 65.879l-13.409-23.471a9.427 9.427 0 0 0-8.178-4.741H28.25a9.414 9.414 0 0 0-9.417 9.416v131.834c0 5.179 4.238 9.416 9.417 9.416h169.5c5.18 0 9.417-4.237 9.417-9.416V80.042a9.414 9.414 0 0 0-9.417-9.417h-74.575a9.421 9.421 0 0 1-8.179-4.746z' fill='%2300d9bf'/%3E%3C/g%3E%3C/svg%3E" type="image/x-icon"><title>新标签页</title><style>*{overflow:hidden;box-sizing:border-box;-webkit-user-select:none;-ms-user-select:none;user-select:none;touch-action:none;-webkit-appearance:none;-moz-appearance:none;font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;cursor:default}#app,body,html{margin:0;border:0;padding:0;width:100%;height:100%}#app{background-size:cover}#searchForm{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);padding:1rem;padding-bottom:15%}#switch{display:flex;flex-direction:row;list-style:none;margin:1rem;padding:0}.switch{flex:auto;color:#fff;opacity:.6;text-shadow:1px 1px 5px #000,0 0 1px #000;transition:opacity .2s ease}.switch:hover{opacity:1!important;transition:opacity .2s ease}#searchBox{background-color:#fff;border-radius:.5rem;box-shadow:0 2px 2px 0 rgba(0,0,0,.16),0 0 0 1px rgba(0,0,0,.08);height:3.5rem;width:40rem;display:flex;transition:box-shadow .4s ease}#searchBox:hover{box-shadow:3px 4px 11px 0 rgba(0,0,0,.32),0 0 0 1px rgba(0,0,0,.16);transition:box-shadow .2s ease}#go,#search,#searchEngine{outline:0;margin:0;border:0;padding:0;height:100%;border-radius:0;justify-content:center;align-items:center;flex:none}#searchEngine{background:#fff;width:10%;border-radius:.5rem 0 0 .5rem;transition:background .4s ease;fill:#000}#searchEngine:hover{background:#b2dfdb;transition:background .2s ease}#search{flex:1 1 auto;width:80%;padding:0 1rem;font-size:1rem;cursor:text}#go{background:#26a69a;width:10%;padding-top:5px;border-radius:0 .5rem .5rem 0;transition:background .4s ease;fill:#fff}#go:hover{background:#009688;transition:background .2s ease}#go:active{background:#00897b;transition:background .2s ease}@media screen and (max-width:700px){#go,#searchEngine{width:calc(10% + (700px - 100%) * .05)}#searchForm{width:96%;padding-bottom:calc(15% + (700px - 100%) * .3)}#searchBox{width:100%}}@media screen and (max-width:270px){#switch{margin:5% auto 5%}}:root{--background-color:#ffffff;--button-color-light:#ffffff;--button-hover-light:#b2dfdb;--button-active-light:#80cbc4;--button-color:#26a69a;--button-hover:#009688;--button-active:#00897b;--text-color:#ffffff}@media (prefers-color-scheme:dark){:root{--background-color:#004d40;--button-color-light:#004d40;--button-hover-light:#004035;--button-active-light:#00332a;--button-color:#00594f;--button-hover:#00665a;--button-active:#004035;--text-color:#ffffff}#search{color:#b2dfdb}#searchEngine{fill:#fff}#go{fill:#000}}.switch{color:var(--text-color)}#searchBox{background:var(--background-color)}#searchEngine{background:var(--button-color-light)}#searchEngine:hover{background:var(--button-hover-light)}#search{background:var(--background-color)}#go{background:var(--button-color)}#go:hover{background:var(--button-hover)}#go:active{background:var(--button-active)}</style></head><body><div id="app"><div id="searchForm"><ul id="switch"><li class="switch" id="web" onclick='switchTo("web")'>网页</li><li class="switch" id="images" onclick='switchTo("images")'>图片</li><li class="switch" id="translate" onclick='switchTo("translate")'>翻译</li><li class="switch" id="dict" onclick='switchTo("dict")'>词典</li><li class="switch" id="map" onclick='switchTo("map")'>地图</li></ul><div id="searchBox"><button type="button" id="searchEngine" aria-label="Switch Search Engine"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="32" height="32" style="width:32px;height:32px"><path d="M5 3v16l3.72 2L18 15.82v-4.09L9.77 8.95l1.61 3.89L13.94 14 8.7 16.92V4.27L5 3"/></svg></button> <input type="search" id="search" placeholder="搜索..." name="q" onkeypress="13==event.keyCode&&search()" value aria-label="搜索"> <button type="button" id="go" onclick="search()" aria-label="Search"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="32" height="32" style="width:32px;height:32px"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg></button></div></div></div><script>var searchURL="https://cn.bing.com/search?q=",searchBox=document.getElementById("searchBox");document.getElementById("web").style.opacity=1,document.getElementById("search").onfocus=function(){searchBox.style.boxShadow="3px 4px 11px 0 rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(0, 0, 0, 0.16)"},document.getElementById("search").onblur=function(){searchBox.style.boxShadow="0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08)"};var fc=function(){document.getElementById("search").focus()};setTimeout(fc,200),switchTo=function(e){var t=document.getElementsByClassName("switch");for(i=0;i<t.length;i++)t[i].style.opacity=.6;switch(e){case"web":searchURL="https://cn.bing.com/search?q=",document.getElementById("web").style.opacity=1;break;case"images":searchURL="https://cn.bing.com/images/search?q=",document.getElementById("images").style.opacity=1;break;case"translate":searchURL="https://translate.google.cn/?sl=auto&tl=zh-CN&op=translate&text=",document.getElementById("translate").style.opacity=1;break;case"dict":searchURL="https://cn.bing.com/dict/search?q=",document.getElementById("dict").style.opacity=1;break;case"map":searchURL="https://ditu.amap.com/search?query=",document.getElementById("map").style.opacity=1}},search=function(){window.location=encodeURI(searchURL+document.getElementById("search").value)},bgimage=function(e){if(200!=e.status.code)return console.log(e.status.message),void(document.getElementById("app").style.background='center no-repeat url("https://infinitypro-img.infinitynewtab.com/findaphoto/bigLink/15175.jpg")');document.getElementById("app").style.background='center no-repeat url("'+e.data.url+'")'}</script><script src="https://bing.ioliu.cn/v1?callback=bgimage"></script></body></html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化