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++训练营--重载
// demo1.cpp : 定义控制台应用程序的入口点. //通过此例程了解重载 #include "stdafx.h" #include <iostream> us ...
- hihocoder #1178 : 计数 暴力
#1178 : 计数 Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://hihocoder.com/problemset/problem/1178 ...
- Skyline TerraExplorer Pro(等ActiveX控件)在Google Chrome浏览器的运行方法
首先感谢ActiveX for Chrome 网银助手(np-activex)这个项目(https://code.google.com/p/np-activex/),解决了我们困惑很久的问题——在Ch ...
- ProgressCircular
https://github.com/eltld/ProgressCircular
- defer和async的区别
先来试个一句话解释仨,当浏览器碰到 script 脚本的时候: <script src="script.js"></script> 没有 defer 或 a ...
- [Angular 2 Router] Configure Your First Angular 2 Route
Using the Angular 2 router requires defining routes, passing them in to the RouterModule.forRoot and ...
- IOS触摸事件和手势识别
IOS触摸事件和手势识别 目录 概述 触摸事件 手势识别 概述 为了实现一些新的需求,我们常常需要给IOS添加触摸事件和手势识别 触摸事件 触摸事件的四种方法 -(void)touchesBegan: ...
- Adding DTrace Probes to PHP Extensions
By cj on Dec 06, 2012 The powerful DTrace tracing facility has some PHP-specific probes that can b ...
- Joynet示例:知乎爬虫(搜索关键字相关回答,并下载其中的---图(mei)片(nv))
先贴爬虫程序下载地址:http://pan.baidu.com/s/1c2lxl1e 下载解压后 可直接运行 其中的 run.bat:或者你手动打开命令行执行:Joynet examples\Spid ...
- python使用rrdtool时 argument 0 must be string的问题
在updatev rrdfile时, ret = rrdtool.updatev(filename, ds) 报了argument 0 must be string的异常,经查是因为python 的r ...