diff --git a/src/header.js b/src/header.js new file mode 100644 index 0000000..a407811 --- /dev/null +++ b/src/header.js @@ -0,0 +1,27 @@ +/** + * Web唐明明 + * 匆匆数载恍如梦,岁月迢迢华发增。 + * 碌碌无为枉半生,一朝惊醒万事空。 + * ComponentName: '头部' + */ + +import React from "react" + +class Header extends React.Component{ + render () { + return( +
+ ) + } +} + +export default Header diff --git a/src/index.css b/src/index.css index 7b78493..1915eb0 100644 --- a/src/index.css +++ b/src/index.css @@ -6,53 +6,32 @@ */ body { - font: 14px "Century Gothic", Futura, sans-serif; - margin: 20px; -} - -ol, ul { - padding-left: 30px; -} - -.board-row:after { - clear: both; - content: ""; - display: table; -} - -.status { - margin-bottom: 10px; -} - -.square { - background: #fff; - border: 1px solid #999; - float: left; - font-size: 24px; - font-weight: bold; - line-height: 34px; - height: 34px; - margin-right: -1px; - margin-top: -1px; + font-size: 14px; + margin: 0; padding: 0; - text-align: center; - width: 34px; } -.square:focus { - outline: none; -} - -.kbd-navigation .square:focus { - background: #ddd; -} - -.game { +.header{ + background: #222; + color: white; + height: 34px; + line-height: 34px; display: flex; - flex-direction: row; + justify-content: space-between; } -.game-info { - margin-left: 20px; +.header span, +.header a{ + padding: 0 10px; + display: inline-block; + color: white; + text-decoration: none; } +.header-app{ + border-right: solid 1px #3a3a3a; +} + +.header-product{ + border-left: solid 1px #3a3a3a; +} diff --git a/src/index.js b/src/index.js index 7241e74..1f2de3c 100644 --- a/src/index.js +++ b/src/index.js @@ -2,161 +2,14 @@ * Web唐明明 * 匆匆数载恍如梦,岁月迢迢华发增。 * 碌碌无为枉半生,一朝惊醒万事空。 - * ComponentName: '官方demo - 组件之间的传参' */ -import React from 'react'; -import ReactDOM from 'react-dom'; -import './index.css'; - -// 类组件 -// class Square extends React.Component { -// // 入口函数 -// render() { -// return ( -// -// ); -// } -// } - -// 函数组件 -const Square = (props) => { - return ( - - ) -} - -class Board extends React.Component { - // 小方格方法 - renderSquare(i) { - return