forked from QiShaoXuan/css_tricks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
872dc15
commit 8dbd7c3
Showing
4 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
|
||
<!DOCTYPE html> | ||
<html lang="zh-cmn-Hans"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" | ||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | ||
<title>CSS Tricks has been migrated</title> | ||
<style> | ||
html, body { | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
p { | ||
margin: 0; | ||
color: #333; | ||
text-align: center; | ||
} | ||
|
||
body { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
article { | ||
margin-top: 15%; | ||
} | ||
|
||
article p { | ||
font-size: 22px; | ||
} | ||
|
||
a { | ||
color: #00adb5; | ||
} | ||
|
||
section { | ||
margin-top: 30px; | ||
} | ||
|
||
section p { | ||
font-size: 18px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<article> | ||
<p>CSS Tricks 已经迁移至<a | ||
href="http://css-tricks.neatbang.com/">这里</a>,如果你已收藏当前网址,请在跳转后更新 | ||
</p> | ||
<p>CSS Tricks has been migrated <a | ||
href="http://css-tricks.neatbang.com/">here</a>, please update after the jump if you have a favorite current url | ||
</p> | ||
|
||
<section> | ||
<p> | ||
页面会在 <span class="second"></span> 秒后跳转 | ||
</p> | ||
<p> | ||
The page will jump after <span | ||
class="second"></span> seconds | ||
</p> | ||
</section> | ||
</article> | ||
|
||
</body> | ||
<script> | ||
const secondSpans = document.querySelectorAll('.second') | ||
countdown(5, secondSpans, () => { | ||
window.location.href = 'http://css-tricks.neatbang.com/' | ||
}) | ||
|
||
function countdown(second, doms, callback) { | ||
|
||
doms.forEach((dom) => { | ||
dom.innerText = second | ||
}) | ||
|
||
if (second == 0) { | ||
return callback && callback() | ||
} | ||
|
||
setTimeout(() => { | ||
countdown(second - 1, doms, callback) | ||
}, 1000) | ||
} | ||
</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters