我有一个文件输入,在"上传"之前,我需要在JAVASCRIPT中计算该.pdf的页数(例如JQuery ......)
我有四个同样大小的div设置如下:
<div id="top-left"></div>
<div id="top-right"></div>
<div id="bottom-left"></div>
<div id="bottom-right"></div>
Run Code Online (Sandbox Code Playgroud)
每个都是页面宽度的50%,绝对定位.像这样,例如:
#top-right {
position: absolute;
top: 0px;
left: 50%;
width: 50%;
height: 50%;
}
Run Code Online (Sandbox Code Playgroud)
问题是当我尝试通过CSS3封面缩放(大)背景图像时.这是我到目前为止的背景图像css:
background: #000 url('DSC01992.jpg') center center fixed no-repeat;
background-size: cover;
-moz-background-size: cover;
-o-(etc.)
Run Code Online (Sandbox Code Playgroud)
这是一个实例:http://jsfiddle.net/TqQv7/
如果您在此处打开占位符图像:http://placekitten.com/2000/1000, 您将看到图像未正确缩放.
我错过了什么吗?
我正在使用spin.js(http://fgnass.github.com/spin.js/),同时加载一个大的全宽/高图像.问题是我在阻止旋转器方面遇到了麻烦.stop()方法似乎不起作用.这就是我所拥有的:
$(document).ready(function($) {
var img = new Image();
img.src = $('#top-bg').css('background-image').replace(/url\(|\)/g, '');
img.onload = function(){
$("#top-bg").spinner.stop();
$(".top-bar").delay(1500).fadeIn(5000);
$("#arrow, #arrowrt, #top-icons").delay(5000).fadeIn(5000);
};
});
Run Code Online (Sandbox Code Playgroud)
我也试过了
.spin(false)
Run Code Online (Sandbox Code Playgroud)
和
.data('spinner').stop()
Run Code Online (Sandbox Code Playgroud)
这是微调器设置:
$(document).ready(function($) {
var opts = {
lines: 9, // The number of lines to draw
length: 11, // The length of each line
width: 4, // The line thickness
radius: 10, // The radius of the inner circle
rotate: 0, // The rotation offset
color: '#fff', // #rgb or #rrggbb
speed: …Run Code Online (Sandbox Code Playgroud) 我想知道如何用jquery淡入css类.我正在寻找的效果有点像你在这里看到的:https://squareup.com/
到目前为止我尝试过的是:
$(document).ready(function() {
$('.mini-nav li').hover(function () {
$('.hover').fadeIn(slow);
};
});
Run Code Online (Sandbox Code Playgroud)
我考虑过.addClass()方法,但我不确定在哪里添加它(或者如果这是最好的事情).
编辑:这是我试过的一个小提琴:http://jsfiddle.net/J93NR/1/
我有两个重叠的div,有css3框阴影.麻烦的是,即使我设置了z-index,我仍然需要消除一个div的box-shadow.我见过使用负差价和零值的情况,但我认为这不会起作用.
我现在的代码是:
#bulb-top {
position: relative;
width: 280px;
height: 280px;
background-color: #E5F7A3;
-webkit-border-radius: 280px;
-moz-border-radius: 280px;
border-radius: 280px;
border: 8px solid #FFF40C;
top: -430px;
margin-left: auto;
margin-right: auto;
-webkit-box-shadow: 0px 0px 15px 1px #FFF40C;
-moz-box-shadow: 0px 0px 15px 1px #FFF40C;
box-shadow: 0px 0px 15px 1px #FFF40C;
z-index: 4;
}
#bulb-bottom {
position: relative;
width: 140px;
height: 120px;
background-color: #E5F7A3;
-moz-border-radius-topleft: 0px;
-moz-border-radius-topright: 0px;
-moz-border-radius-bottomright: 30px;
-moz-border-radius-bottomleft: 30px;
-webkit-border-radius: 0px 0px 30px 30px;
border-radius: 0px 0px 30px 30px;
border-left: 8px solid …Run Code Online (Sandbox Code Playgroud) 我的内部css不适用于我的小代码.这似乎是一个非常愚蠢的问题,但我没有做任何帮助.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>Ask Help</title>
<style type = "text/css">
@font-face {
font-family: "junction";
src: url("Junction_02.otf");
}
html {
background-image: linear-gradient(bottom, rgb(75,135,163) 2%, rgb(127,219,219) 54%);
background-image: -o-linear-gradient(bottom, rgb(75,135,163) 2%, rgb(127,219,219) 54%);
background-image: -webkit-linear-gradient(bottom, rgb(75,135,163) 2%, rgb(127,219,219) 54%);
background-image: -ms-linear-gradient(bottom, rgb(75,135,163) 2%, rgb(127,219,219) 54%);
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.02, rgb(75,135,163)), color-stop(0.54, rgb(127,219,219))
}
.menu {
list-style-type: none;
font-size: 25px;
}
h1 {
font-family: junction;
text-size: 60px;
}
</style>
</head>
<body>
<nav>
<ul class="menu">
<li><a href="index.html" …Run Code Online (Sandbox Code Playgroud)