瀏覽代碼

增加层叠样式表

unknown 10 月之前
父節點
當前提交
1337ea5083
共有 4 個文件被更改,包括 211 次插入0 次删除
  1. 35 0
      source/wwwroot/css/common.css
  2. 31 0
      source/wwwroot/css/game_hall.css
  3. 80 0
      source/wwwroot/css/game_room.css
  4. 65 0
      source/wwwroot/css/login.css

+ 35 - 0
source/wwwroot/css/common.css

@@ -0,0 +1,35 @@
+/* 公共的样式 */
+
+* {
+    margin: 0;
+    padding: 0;
+    box-sizing: border-box;
+}
+
+html, body {
+    height: 100%;
+
+    background-image: url(../image/cat.jpg);
+    background-repeat: no-repeat;
+    background-position: center;
+    background-size: cover;
+}
+
+.nav {
+    height: 50px;
+
+    background-color: rgb(50, 50, 50);
+    color: white;
+
+    line-height: 50px;
+    padding-left: 20px;
+}
+
+.container {
+    width: 100%;
+    height: calc(100% - 50px);
+
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}

+ 31 - 0
source/wwwroot/css/game_hall.css

@@ -0,0 +1,31 @@
+
+#screen {
+    width: 400px;
+    height: 200px;
+    font-size: 20px;
+    background-color: gray;
+    color: white;
+    border-radius: 10px;
+
+    text-align: center;
+    line-height: 100px;
+}
+
+#match-button {
+    width: 400px;
+    height: 50px;
+    font-size: 20px;
+    color: white;
+    background-color: orange;
+    border: none;
+    outline: none;
+    border-radius: 10px;
+
+    text-align: center;
+    line-height: 50px;
+    margin-top: 20px;
+}
+
+#match-button:active {
+    background-color: gray;
+}

+ 80 - 0
source/wwwroot/css/game_room.css

@@ -0,0 +1,80 @@
+#screen {
+    width: 450px;
+    height: 50px;
+    margin-top: 10px;
+    background-color: #fff;
+    font-size: 22px;
+    line-height: 50px;
+    text-align: center;
+}
+#chat_area {
+    width: 404px;
+    height: 400px;
+    margin-top: 10px;
+    margin-left: 150px;
+    border: 2px solid #fff; border-radius: 5px;
+    position: relative;
+    background-color: #fff;
+}
+#chat_show {
+    width: 400px;
+    height: 300px; overflow-y: scroll;
+    background-color: #fec;
+    font-size: 22px;
+    line-height: 50px;
+    text-align: center;
+}
+#chat_input {
+    width: 300px;
+    height: 50px;
+    margin-top: 30px;
+    background-color: #fff;
+    font-size: 30px;
+    border: 2px solid #fec; border-radius: 5px;
+    vertical-align: top;
+}
+#chat_button {
+    width: 90px;
+    height: 50px;
+    margin-top: 30px;
+    background-color: #fec;
+    font-size: 15px;
+    border: 2px solid #fec; border-radius: 5px;
+    vertical-align: top;
+}
+#chat_button:hover {
+    width: 90px;
+    height: 50px;
+    margin-top: 30px;
+    background-color: rgb(201, 145, 32);
+    font-size: 15px;
+    border: 2px solid #fec; border-radius: 5px;
+    vertical-align: top;
+}
+#chat_button:active {
+    width: 90px;
+    height: 50px;
+    margin-top: 30px;
+    background-color: rgb(149, 127, 83);
+    font-size: 15px;
+    border: 2px solid #fec; border-radius: 5px;
+    vertical-align: top;
+}
+
+#self_msg {
+    height: 35px;
+    line-height: 35px;
+    font-size: 15px;
+    float: right;
+    background-color: rgb(7, 190, 102);
+    border-radius: 5px;
+}
+#peer_msg {
+    height: 35px;
+    line-height: 35px;
+    font-size: 15px;
+    float: left;
+    background-color: rgb(93, 218, 243);
+    border-radius: 5px;
+}
+

+ 65 - 0
source/wwwroot/css/login.css

@@ -0,0 +1,65 @@
+
+.login-container {
+    height: calc(100% - 50px);
+
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+
+.login-dialog {
+    width: 400px;
+    height: 400px;
+    background-color: rgba(255, 255, 255, 0.8);
+    border-radius: 10px;
+}
+
+/* 标题 */
+.login-dialog h3 {
+    text-align: center;
+    padding: 50px 0;
+}
+
+/* 针对一行设置样式 */
+.login-dialog .row {
+    width: 100%;
+    height: 50px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.login-dialog .row span {
+    width: 100px;
+    font-weight: 700;
+}
+
+#user_name, #password {
+    width: 200px;
+    height: 40px;
+
+    font-size: 20px;
+    line-height: 40px;
+    padding-left: 10px;
+    border: none;
+    outline: none;
+    border-radius: 10px;
+}
+
+#submit {
+    width: 300px;
+    height: 50px;
+
+    background-color: rgb(0, 128, 0);
+    color: white;
+
+    border: none;
+    outline: none;
+    border-radius: 10px;
+
+    margin-top: 20px;
+}
+
+#submit:active {
+    background-color: #666;
+}