HTML
<div class="vertical-container">
<div class="vertical-center">Centered</div>
</div>
CSS
.vertical-container {
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>多文字向上滑动切换</title> | |
<link rel="stylesheet" href="../reset.css" /> | |
<style> | |
.textbox { |
$(function() { | |
var height, _height; | |
setInterval(function(){ | |
height = $(document.body).height(); | |
if (height != _height){ | |
_height = height; | |
$(parent.document.body).find("#testifr").height(height); | |
} | |
}, 0); | |
}); |
String.prototype.colorHex = function() { | |
var that = this; | |
//十六进制颜色值的正则表达式 | |
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; | |
// 如果是rgb颜色表示 | |
if (/^(rgb|RGB)/.test(that)) { | |
var aColor = that.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); | |
var strHex = "#"; | |
for (var i=0; i<aColor.length; i++) { |
var LightenDarkenColor = function(col, amt) { | |
var usePound = false; | |
if (col[0] == "#") { | |
col = col.slice(1); | |
usePound = true; | |
} | |
var num = parseInt(col,16); |
<div class="vertical-container">
<div class="vertical-center">Centered</div>
</div>
.vertical-container {
$(document.body).append('<div id="zoom" style="background-image:'+$(this).css('background-image')+'"></div>'); | |
var $offset = $slidea.offset(); | |
$('#zoom').css({'width':$slidea.width(),'height':$slidea.height(),'left':$offset.left,'top':$offset.top}); | |
$('#zoom').animate({left:0,top:0,bottom:0,right:0,height:'100%',width:'100%'}, 500, function() { | |
var $source = $('#zoom'), | |
offset = $source.offset(), |