本文主要包含html输入表情,,,,html获取文本框的值,表情输入框等相关知识,佚名 希望在学习及工作中可以帮助到您
HTML带表情的评论框,表情通过Json数据加载,可以根据自己的喜好改变表情。本评论框代码为HTML,CSS,JQ三个方面的代码。图1为原始状态,图2为点击表情时出现的表情列表,可以任意选择一个或者多个。下面我们来看看实现的代码。
图1
图2
实现的代码:
html代码:
- <div class="Main">
- <div class="Input_Box">
- <textarea class="Input_text"></textarea>
- <div class="faceDiv"> </div>
- <div class="Input_Foot"> <a class="imgBtn" href="javascript:void(0);"></a><a class="postBtn">确定</a> </div>
- </div>
- </div>
css3代码:
- .Input_Box {
- width: 495px;
- height: 160px;
- border: 1px solid #ccc;
- transition: border linear .2s, box-shadow linear .5s;
- -moz-transition: border linear .2s, -moz-box-shadow linear .5s;
- -webkit-transition: border linear .2s, -webkit-box-shadow linear .5s;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- background-color: #fff;
- overflow: hidden;
- position: absolute;
- -moz-box-shadow: 0 0 5px #ccc;
- -webkit-box-shadow: 0 0 5px #ccc;
- box-shadow: 0 0 5px #ccc;
- }
- .Input_Box>textarea {
- width: 485px;
- height: 111px;
- padding: 5px;
- outline: none;
- <