abstract:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>模拟实时聊天</title> <style> div:nth-child(1){ width: 450px;height: 650px;
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>模拟实时聊天</title> <style> div:nth-child(1){ width: 450px;height: 650px;background:#1891ed;margin:30px auto;color: #333;box-shadow: 2px 2px 2px #808080; } h2{text-align: center;padding-top: 20px;} div:nth-child(2){ width: 400px;height: 500px; margin:20px auto 10px; background:#fff; } ul{list-style: none;line-height: 2em;overflow: hidden;padding: 15px} table{height:60px;margin:auto; padding:0 20px} textarea{width: 95%;border:none;resize: none;background: #fffdde;height: 40px;} button{width: 60px;height: 40px;background: #0089ff;color: #fff;border:none;box-shadow: 0px 0px 10px #ccc} button:hover{cursor: pointer;background: #ff6700} </style> </head> <body> <div> <h2>实时聊天</h2> <div> <ul> <li></li> </ul> </div> <table> <tr> <td aling='right'><textarea name="text" id="" cols="50" rows="4"></textarea> </td> <td><button type="button">发送</button></td> </tr> </table> </div> <script> let btn = document.getElementsByTagName('button')[0]; let text = document.getElementsByName(text)[0]; let list =document.getElementsByTagName('ul')[0]; let sun = 0; </script> </body> </html>
Correcting teacher:韦小宝Correction time:2019-01-20 17:48:39
Teacher's summary:写的很不错 整个的样式看上去还是很不错 继续加油吧