browser window
如果是,我的应用程序看起来不错fully maximized
。当collapsed
我. _minimized
browser window
我不需要折叠内容。我已经给出了div
看起来只textarea
显示消息的内容%
。
我的 Jsp 将是,
<div style="padding-left: 16px;" id="messageLayout">
<div id="messageDisplayArea" >
</div>
</div>
我的jquery
意志是,当我send button
点击
function send(){
name = $("#name").val();
message = $("#message").val();
var time = "Time";
var user = "<div id='user' class='fontStyle'>"+name+"</div>";
var msg = "<div id='msg' class='fontStyle'>"+message+"</div>";
var timeStamp = "<div id='time' class='fontStyle'>"+time+"</div>";
var row = "<div id='msgSet' >"+ user + msg + timeStamp +"</div>";
$("#messageDisplayArea").append(row);
}
我的CSS
意志是
#messageDisplayArea {
height: 250px;
width: 100%;
overflow: auto;
border-color: #6495ED;
white-space: normal;
border-style: solid;
border-width: 1px;
background-color: white;
}
#user {
width: 10%;
float: left;
color: red;
word-wrap: break-word;
}
#msg {
width: 79%;
color: green;
float: left;
word-wrap: break-word;
}
#time {
width: 10%;
float:left;
color: gray;
word-wrap: break-word;
padding-left: 5px;
}
#msgSet {
width: 100%;
float:left;
word-wrap: break-word;
padding-bottom: 5px;
padding-top: 5px;
}
好的答案绝对值得赞赏。