- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试创建一个类似于进度条的可拖动栏。在页面加载时,栏将处于预定的百分比,例如 42%,有没有办法使该栏也可拖动?这是 HTML:
<div class="reviewAttn_bar"><span id="resizable" style="width:42%"></span></div>
我使用的jquery是:
$(function() {
$( "#resizable" ).resizable({ handles: 'e' });
});
但是什么也没发生。 CSS 处理跨度的大小。我正在考虑在顶部创建一个箭头图形,用户可以使用它来将栏拖动到不同的百分比,但我无法让这部分工作。有什么建议吗?
这是我正在使用的CSS:
.reviewAttn_bar {
background-color: #1a1a1a;
-webkit-background-size: 100px 100px;
-moz-background-size: 100px 100px;
background-size: 100px 100px;
background-image: -webkit-gradient(linear, left top, right bottom,
color-stop(.25, rgba(255, 255, 255, .15)), color-stop(.25, transparent),
color-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .15)),
color-stop(.75, rgba(255, 255, 255, .15)), color-stop(.75, transparent),
to(transparent));
background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
background-image: -ms-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
background-image: -o-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
height: 65px;
width: 280px;
margin: 50px 0 50px -55px;
-moz-border-radius: 0 5px 5px 0;
-webkit-border-radius: 0 5px 5px 0;
border-radius: 0 5px 5px 0;
-moz-box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
-webkit-box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
}
.reviewAttn_bar span {
background-color: #ccc;
-webkit-background-size: 100px 100px;
-moz-background-size: 100px 100px;
background-size: 100px 100px;
background-image: -webkit-gradient(linear, left top, right bottom,
color-stop(.25, rgba(255, 255, 255, .15)), color-stop(.25, transparent),
color-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .15)),
color-stop(.75, rgba(255, 255, 255, .15)), color-stop(.75, transparent),
to(transparent));
background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
background-image: -ms-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
background-image: -o-linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
transparent 75%, transparent);
height: 71%;
-moz-border-radius: 0 3px 3px 0;
-webkit-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
}
#resizable {
display:block;
}
最佳答案
编辑: updated the fiddle here with all of your source the handle EAST is also operating just fine
请注意,我包含了 jquery、jquery ui 和 jquery-ui CSS 文件。
i checked the jquery .resizable() API documentation here和
不是为了打败一匹马,但我注意到添加 handle E 完全删除了右下角的可拖动“纹理”,但它仍然有效 - 您必须非常具体地将鼠标悬停在状态栏跨度的右侧才能看到光标发生变化并知道它可以调整大小。只是想涵盖我的所有基础 - 虽然你可能没有“看到”差异,但它实际上是在 fiddle 上工作
<小时/>默认情况下CSS全部span elements are "inline" elements - 意味着他们的CSS显示属性默认为
display:inline;
为了使 jquery UI .ressized() 处理程序正常工作,必须在“ block ”元素(例如 div)上调用它。
ive taken your code and modified in a fiddle here工作源码如下:
HTML
<div class="reviewAttn_bar"><span id="resizable" style="width:42%"></span></div>
CSS
#resizable{
display:block;
border:1px solid red; // can be ignored just to help visualize
height:30px; // can be ignored just to help visualize
}
JS
$(function() {
$( "#resizable" ).resizable();
});
从可调整大小的处理程序中删除 {handles: 'e'} 参数并将 css block 样式添加到您的 #resizing 元素,现在一切都按预期工作。
关于jquery - 可拖动进度条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16705115/
我正在开发一个在 gridview 中显示数据表内容的网页。而且,还有一个名为“发送到 Excel”的按钮。如果用户单击此按钮,该程序将开始生成报告(将数据表内容写入 excel 文件)。完成后,会出
理论:我在开始时做出了大约 100 个 promise ,然后使用 Promise.all() 解决它们。 这 100 个 promise 中的每一个依次进行一些异步 REST 调用,其响应可能主要不
在将文件添加到 python 中的 tar 存档时,是否有任何库可以显示进度,或者可以扩展 tarfile 模块的功能来执行此操作? 在理想情况下,我想展示 tar 创建的总体进度以及关于何时完成的预
有没有办法在 Xcode 中更改进度 View 栏的高度? 我正在使用 Xcode 4.3 并且需要一个垂直进度条。我旋转了栏,但现在无法更改高度并且显示为一个圆圈。 还有一种更有效的旋转进度条的方法
您好,我想在栏按钮项上制作未确定的进度 View 。完成后我想让它隐藏,但 hidden() 方法没有像 disabled(Bool) 这样的参数。任务完成后如何隐藏进度 View ? 这就是我要的
我有一个管理员控制的功能(导入数据库)可能需要一些时间才能完成,所以我想在这段时间内向用户显示一些反馈 - 例如进度条,或者只是一些消息。即使在长时间的 Action 中分部分发送页面也足够了。 在
我是一个进步的菜鸟,实际上在基本 block 方面有问题。 下面的问题是在我的 if else 语句中。它在 if, then, else then 时工作正常,但是当我想将多个语句放入 if 部分时
我有一个来自 rsync 命令的日志文件,其中有进度。运行此进度时,会更新同一行上的显示信息。当我捕获此命令的输出时,我得到一个在终端上使用 cat 正常显示的文件(重播所有退格键和重新编辑)但我希望
我需要处理一些数据,每 5-10 秒显示一个进度(我以 % 显示进度,但我也更新了一些图表)。我想在没有多线程的情况下做到这一点。 循环可能相当大。它可以从数百万开始,可以高达数十亿。 我可以使用 G
我正在致力于使用 PHP、HTML 和 JavaScript 制作半直播互联网 channel 。 您可以在此处查看演示:http://mariocreative.host/chanelko/inde
我实际上正在使用图像为“点点点”进度设置动画。我想通过使用下面的代码来使用不透明度。 动画将持续 3 秒,有没有更简单的动画方法? 最佳答案 这是一个快速版本,它会在控
我写了这个程序,它返回用户插入的最大整数。现在,我希望程序返回第二大整数。我创建了一个新变量(称为“状态”),该变量应该在每次循环重复时增加 1 个单位。然后,在中断条件发生后,我将在状态变量中后退
我正在制作一个需要保存进度的java游戏。但我不想让外部文件保存进度(像《我的世界》这样的游戏有一个存储文件的“保存”目录)。所以基本上我希望它存储一些数据,当用户退出并再次返回时可以检索这些数据。比
我正在使用 forEach_root 方法在 Android 上计算图像。 RenderScript RS=RenderScript.create(context); Allocation inPix
我希望这个进度 View 在完成后基本上“重置”。 尝试将计数重置为 0,它确实重置了,但是对于每次重置,计时器只会变得越来越快。 .h @property (nonatomic, strong) N
我不确定这是否可能。当您单击“提交”按钮时,似乎有一种方法可以做到这一点。 private Button getButton(String id) { return new AjaxButto
我找不到关于如何在迭代循环时更新 UIProgressbar 进度的明确答案,例如: for (int i=0;i
我正在尝试在 Xcode 中翻转 UIProgressView 180,同时我正在尝试缩放进度 View 。在我添加翻转之前缩放效果很好,然后缩放不再起作用。有什么建议么?谢谢! [self.seco
我目前正在通过评估 prepareForSegue 中的 segue.identifier 动态加载新 View : - (void)prepareForSegue:(UIStoryboardSegu
当任意进程发生时,我需要在屏幕上为用户提供状态。我无法知道需要多长时间。我怎样才能永远增加 progressView (当它接近 1 时它会减慢)。 最佳答案 This如果您愿意更换进度 View ,
我是一名优秀的程序员,十分优秀!