Benjy Cui
9 years ago
committed by
afc163
5 changed files with 51 additions and 5 deletions
@ -1,6 +1,3 @@ |
|||
<p>找不到此页,三秒后返回首页...</p> |
|||
<script> |
|||
setTimeout(function() { |
|||
location.href = '/'; |
|||
}, 3000); |
|||
location.href = '/#' + location.pathname.replace('#', '?scrollTo='); |
|||
</script> |
|||
|
@ -0,0 +1,17 @@ |
|||
import React from 'react'; |
|||
import { Link } from 'react-router'; |
|||
import './index.less'; |
|||
|
|||
export default function NotFound() { |
|||
return ( |
|||
<div id="page-404"> |
|||
<section> |
|||
<h1>404</h1> |
|||
<p>你要找的页面不存在 <Link to="/">返回首页</Link></p> |
|||
</section> |
|||
<style dangerouslySetInnerHTML={{ |
|||
__html: '#react-content { height: 100%; background-color: #fff }' |
|||
}} /> |
|||
</div> |
|||
); |
|||
} |
@ -0,0 +1,30 @@ |
|||
#page-404 { |
|||
background-image: url('https://os.alipayobjects.com/rmsportal/NOAjOBbnYCrNzrW.jpg'); |
|||
width: 100%; |
|||
height: 100%; |
|||
background-repeat: no-repeat; |
|||
background-attachment: fixed; |
|||
background-position: center; |
|||
background-size: 100%; |
|||
position: relative; |
|||
|
|||
section { |
|||
position: absolute; |
|||
top: 48%; |
|||
left: 55%; |
|||
margin: -103px 0 0 -120px; |
|||
|
|||
text-align: center; |
|||
} |
|||
|
|||
h1 { |
|||
color: #2DB7F5; |
|||
font-size: 120px; |
|||
font-weight: 500; |
|||
} |
|||
|
|||
p { |
|||
color: #666; |
|||
font-size: 18px; |
|||
} |
|||
} |
Loading…
Reference in new issue