JavaScript之点击文字放大
function box(){
document.getElementById("click").style.WebkitTransform="scale(1.2)";
}
function jiao(){
document.getElementById("click").style.WebkitTransform="scale(1)";
}
我们来点击运行测试一下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" charset="utf-8" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head>
<style type="text/css">
.box{
margin:30px 0 0 30px;
width:100px;
background-color:green;
color:white;
text-align:center;
cursor:pointer;
padding:30px;
}
</style>
<script type="text/javascript">
function box(){
document.getElementById("click").style.WebkitTransform="scale(1.2)";
}
function jiao(){
document.getElementById("click").style.WebkitTransform="scale(1)";
}
</script>
<body>
<div class="box" id="click" onMouseOver="box()" onMouseOut="jiao()">
点我!
</div>
</body>
</html>
JavaScript之点击文字放大的更多相关文章
- JavaScript 点击图片放大功能
<!doctype html> <html> <head> <meta charset="utf-8" /> <title&g ...
- JavaScript 实现用户点击图片放大
JavaScript 实现用户点击图片放大 一.契机 情况是这样的,之前推荐朋友去建站.后面他专门写了一篇文章说如何实现 "用户点击图片实现放大效果",俺就好好 "拜读& ...
- 网页mp3语音展示,点击图片放大,点击图片跳转链接,调表格
查看mp3语音 <td class="value"><embed src="${sounds.soundName}" type="a ...
- HTML5 <input>添加多张图片,可点击弹窗放大。限定4张,可删除。
点击弹窗放大,需要加入插件. <link rel="stylesheet" href="css/photoswipe.css"> <link ...
- ztree点击文字勾选checkbox,radio实现方法
ztree的复选框checkbok,单选框radio是用背景图片来模拟的,所以点击文字即使用label括起checkbox,radio文字一起,点击文字也是无法勾选checkbox. 要想点击ztre ...
- jQuery实现文字放大效果
实现效果:当鼠标移动到超链接的那一瞬间就出现提示. <!DOCTYPE html> <html> <head> <meta charset="UTF ...
- php实现点击文字提交表单并传递数据至下一个页面
<?php $id="4";//等会要把这个数据传到第二个页面 ?> <?php echo "<li>"; echo " ...
- 点击文字弹出一个DIV层窗口代码
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <hea ...
- vue项目 一行js代码搞定点击图片放大缩小
一行js代码搞定xue项目需要点击图片放大缩小,其实主要用的是用到了vue:class的动态切换,内容比较简单.一开始我把维护的需求想得太复杂了,和测试小姐姐聊了一下才反应过来. 两个月不到跟了四个项 ...
随机推荐
- C++经典面试题
1.int a=5,则 ++(a++)的值是() A.5 B. 6 C.7 D.逻辑错误 a++返回的是一个暂时变量,这里是右值,不能再前面++了 2.以下 ...
- Codeforces Round #245 (Div. 1) 429D - Tricky Function 最近点对
D. Tricky Function Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 codeforces.com/problemset/problem/42 ...
- 一步步学Mybatis-以接口操作的方式编程(2)
上一章节中,我们已经搭建玩了最简单的能够运行的HelloWorld环境,这一章将把上章中的操作方式改为以接口的方式操作 我们可以发现在上一个章节中 public static void testBas ...
- OverHust
https://github.com/fanhongwei/OverHust https://github.com/eltld/OverHust
- js 获取cookie
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head ...
- qt的安装和debug
qt-opensource-windows-x86-msvc2013_64_opengl-5.3.0 这个已经包含了qt-creator-opensource-windows-x ...
- 用vim处理字符的大小写转换
转载: http://blog.csdn.net/ruixj/article/details/3765385 http://www.linuxsong.org/2010/09/vim-convert- ...
- Android自定义窗口动画
第一步,设置出现和消失的xml 1.在res/anim下创建enter_anim.xml,设置窗口出现的动画 <?xml version="1.0" encoding=&qu ...
- 关于h5手机端上拉加载和下拉刷新效果-1
1.手机端目前很火的效果,上拉加载,和下拉刷新.目前主要使用 iscroll 框架来实现.先推荐一个iscroll中文学习的网站,不要感谢,我是雷锋. 2.https://iiunknown.gitb ...
- WPF 之 跳转
WPF的跳转有两种:一是windows窗体,另外一种是page页. 1.windows窗体跳转 1)先实例化目标窗体: 2)然后将目标窗体show(). 例如:有两个窗体Main和Login,要想点击 ...