html5实现手机弹窗留言对话框

<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="apple-touch-fullscreen" content="YES" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="format-detection" content="telephone=no" />
<title>html5实现手机弹窗留言对话框-webkfa.com</title>
<style>
*{
margin:0;padding:0;
-webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */
-webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */
-webkit-tap-highlight-color: rgba(210,210,210,0.35); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
-webkit-user-select: none; /* prevent copy paste, to allow, change ‘none‘ to ‘text‘ */
}
body{font-family:"微软雅黑";font-size:12px;background: url(http://image.kuwo.cn/kdt2014/bg.png) repeat;}
ul,li{list-style:none;}

.black_overlay{
display: block;
position: fixed;top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.white_content{
display: block;
position: fixed;
top: 15%; left: 0;
width: 100%;
background-color: white;
z-index:1002;
overflow:hidden;
}
.tcw{width:100%;min-width:320px;}
#dituContent textarea{color:#868686;width:92%;padding:2%;height:122px;border:1px solid #b6b6b6;border-radius:2px;line-height:18px;margin:2%;}

.huati_btn2{width:30%;height:32px;background:#34a0f0;border-radius:3px;font:14px/32px "微软雅黑";display:block;overflow:hidden;margin:0 auto;text-align:center;color:#fff;text-decoration:none;margin:2% 10%;}
.im {overflow:hidden;padding:4% 0 2% 0;margin-top:0px}/*改*/
.im span{width:33%;float:left;text-align:center; vertical-align:absmiddle}
.im input{ vertical-align:middle;margin:-3px 5px 0 0}

.huati_btn{width:175px;height:32px;background:#34a0f0;border-radius:3px;font:14px/32px "微软雅黑";display:block;overflow:hidden;margin:0 auto;text-align:center;color:#fff;text-decoration:none;}
.huati{height:40px;padding-top:9px;border-bottom:1px dashed #cecece}

.text_w{color:#282828;font-size:14px;padding:0 2%;height:28px;}
.input{padding:0 2%;}
.input input{color:#868686;width:96%;padding:0 2%;height:32px;border:1px solid #b6b6b6;border-radius:2px;}
</style>
</head>

<body>
<div class="black_overlay" id="blackoverlayid"></div>
<div id="light" class="white_content">
<div class="tcw" style="" id="dituContent">
<div>
<textarea id="userText" onkeyup="ckeyup();" cols="" rows="" class="textarea" onfocus="if(this.value == ‘最多输入200个字‘){this.value =‘‘;this.style.color=‘#313131‘;}" onblur="if(this.value == ‘‘){this.value =‘最多输入200个字‘;this.style.color=‘#868686‘;}" style="color: rgb(134, 134, 134);">最多输入200个字</textarea>
</div>
<p class="text_w">想被怎么称呼呢:</p>
<div class="input">
<input type="text" value="" id="userName" onfocus="if(this.value == def_uname){this.value =‘‘;this.style.color=‘#313131‘;}" onblur="if(this.value == ‘‘){this.value =def_uname;this.style.color=‘#868686‘;}" maxlength="20">
</div>
<p class="im">
<span style="width:50%;color:#34A0F0;"><input name="fsfanName" type="checkbox" value="莫粉">莫粉</span>
<span style="width:50%;color:#FF6E6E;"><input name="fsfanName" type="checkbox" value="萱粉">萱粉</span>
</p>
<div>
<a href="javascript:hidetc();" class="huati_btn2" style="float:left;">取消</a>
<a href="javascript:addmess();" class="huati_btn2" style="float:right;">留言</a>
</div>
</div>
</div>
<script type="text/javascript">
function hidetc(){
var obj1=document.getElementById("blackoverlayid");
obj1.style.display=‘none‘;
var obj2=document.getElementById("light");
obj2.style.display=‘none‘;
}
function addmess(){
alert("请自己实现");
}
</script>
</body>

</html>

在线浏览代码

时间: 2024-07-30 22:45:57

html5实现手机弹窗留言对话框的相关文章

[android] 手机卫士自定义对话框布局

手机防盗页面部分 点击手机防盗,进行判断,如果没有设置密码,显示一个设置密码的对话框,如果已经设置密码了,弹出输入密码对话框 密码保存在SharedPreferences中,数据取出进行判断 自定义一个布局文件,dialog_setup_password.xml 根布局宽度不要充满屏幕 内部控件,宽度要小一点留出空间,居中对齐,android:gravity=”center” 两个并排的按钮,确定和取消,线性布局水平朝向 获取AlertDialog.Builder对象,通过new Builder

html5开发手机打电话发短信功能,html5的高级开发,html5开发大全,html手机电话短信功能详解

在很多的手机网站上,有打电话和发短信的功能,对于这些功能是如何实现的呢.其实不难,今天我们就用html5来实现他们.简单的让你大开眼界. HTML5 很容易写,但创建网页时,您经常需要重复做同样的任务,如创建表单.在这...有 HTML5 启动模板.空白图片.打电话和发短信.自动完成等等,帮助你提高开发效率的同时,还带来了更炫的功能.好了,我们今天就来做一做看看效果吧!! 看代码: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitio

HTML5开发手机应用--viewport的作用--20150216

在用HTML5开发手机应用或手机网页时,<head>部分总会有如下一段代码,这段代码到底什么意思呢.在网上,大家会得到很多答案.我从网上搜集了部分介绍,整理一下,以留备用. <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" /> 什么是Viewp

HTML5调用手机摄像头,仅仅支持OPPOHD浏览器

1 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>HTML5调用手机摄像头,仅仅支持OPPOHD浏览器</title> 6 <style> 7 #video { border: 1px solid #ccc; display:inline-block; } 8 #canvas

拍照保存(调用手机),对话框的自定义样式

主页面布局文件很简单就是一个按钮弹出对话框,一个imageView显示选择的图片. 我给大家提供了下载代码在这个网页:http://download.csdn.net/download/u011348453/7669871 main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/r

HTML5做手机站页面字体显示很小的解决方法

原文:HTML5做手机站页面字体显示很小的解决方法 HTML5做手机站需要加上一部分代码,不然字体会显示很小的,经历了很久的不解才发现的,希望给大家一些帮助 <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org

HTML5开发手机应用--viewport的作用

HTML5开发手机应用--viewport的作用 在用HTML5开发手机应用或手机网页时,<head>部分总会有如下一段代码,这段代码到底什么意思呢.在网上,大家会得到很多答案.我从网上搜集了部分介绍,整理一下,以留备用. <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable

HTML5实现手机摇一摇的功能

利用html5实现类似微信的手机摇一摇功能,并播放音乐. 1.  deviceOrientation:封装了方向传感器数据的事件,可以获取手机静止状态下的方向数据,例如手机所处角度.方位.朝向等. 2.  deviceMotion:封装了运动传感器数据的事件,可以获取手机运动状态下的运动加速度等数据. js如下: <scirpt> var SHAKE_THRESHOLD = 3000; var last_update = 0; var x = y = z = last_x = last_y =

HTML5+JS手机web开发之jQuery Mobile初涉

一.起始之语 我一直都是在PC上折腾网页的,这会儿怎么风向周边捣鼓起手机网页开发呢?原因是公司原先使用Java开发的产品,耗了不少人力财力,但是最后的效果却不怎么好.因为,Android系统一套东西,iPhone又是新的一套,折腾死人呐. 于是总监发狠,让我把手上的活都交出去,专心折腾web版的,看看最后效果如何. 加上我觊觎手机上的开发学习很久了,于是,一拍即合,搞起了手机开发方面的学习. 分享是很好的提高自身学习的方法.因为分享过程中梳理了所学,往往会有些意想不到的心得与收获.如此利人利已的