<html>
<head>
<link href="http://cdn.bootcss.com/twitter-bootstrap/3.0.2/css/bootstrap.css" rel="stylesheet">
<style>
body{
margin-top: 30px;
}
.box {
width: 400px; padding: 15px; background-color: #f0f3f9;
}
.content {
height: 0; position: relative; overflow: hidden;
-webkit-transition: height 0.6s;
-moz-transition: height 0.6s;
-o-transition: height 0.6s;
transition: height 0.6s;
}
.content img {
position: absolute; bottom: 0;
}
.block{
margin: 20px 20px 20px 0;
width:100px;
height:100px;
background:blue;
transition:background 2s, width 2s;
} .block:hover{
width:300px;
background:red;
} </style>
</head>
<body>
<div class="container">
<div class="block"></div>
<a href="javascript:" class="btn btn-primary" id="button">点击展开图片</a>
<div id="more" class="content">
<img src="http://i1.hoopchina.com.cn/u/1403/26/425/2709425/3076ecc2.jpg" height="191" />
</div>
</div> <script>
(function() {
var Btn = document.getElementById("button"),
More = document.getElementById("more"); var display = false; Btn.onclick = function() {
display = !display;
More.style.height = display? "192px": "0px"
return false;
};
})();
</script>
</body>
</html>

最新文章

  1. CAST function should support INT synonym for SIGNED. i.e. CAST(y AS INT)
  2. Qt StyleSheet样式表实例(转)
  3. Java SSH库使用简介:Apache sshd和JSch(Java Secure Channel)
  4. 安装PIL库时提示python未注册错误(自定义python安装路径)
  5. The Accomodation of Students(判断二分图以及求二分图最大匹配)
  6. intel hex 格式的几个链接
  7. 摘抄详细的VUE生命周期
  8. grep 及正则表达式
  9. QT之Http请求
  10. myeclipse安装spring插件
  11. java连接Mysql8
  12. mycql 多表联合查询
  13. toggle显示与隐藏切换
  14. VS2017上在线和离线安装Qt插件(在线安装)
  15. 大话设计模式C++ 适配器模式
  16. Leetcode 5016. 删除最外层的括号
  17. Go Example--map
  18. 设置ListView显示到最后一行
  19. 流行的软件工程过程--Rational统一过程!
  20. 按照Right-BICEP要求设计四则运算2程序的单元测试用例

热门文章

  1. -- &gt; define的用法与学习(1)
  2. CentOS设置程序开机启动程序/服务的方法(转)
  3. spring mvc参数校验
  4. SfM执行流程
  5. 利用Clojure统计代码文件数量和代码行数
  6. Mysql net start mysql启动,提示发生系统错误 5 拒绝訪问 解决之道
  7. Windows 9立即公布了
  8. Fragment中的setUserVisibleHint()方法调用
  9. 【转】获取Android控件的宽和高
  10. Request returned failure status 401