- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
的滚动条在动画过程中会消失吗?有什么想法可以解决这个问题吗?
看起来在pre标签的动画过程中,pre的滚动条会消失,但稍后当动画结束时会出现。我怎样才能让它出现在整个动画中?
<script type="text/javascript">
$(document).ready(function(){
$('pre').hover(
function(){
if($(this).width()==520){
$(this).animate({width:'800'},400);
$(this).css({border:'2px solid #2B99E6'});
}
},
function(){
if($(this).width()==800){
$(this).animate({width:'520'},400);
$(this).css({border:'2px solid #555555'});
}
}
);
});
</script>
<style type="text/css">
pre {
background: url("images/source.jpg") no-repeat scroll 0 0 #333333;
border: 2px solid #555555;
color: green;
font-family: arial;
margin: 0;
overflow: scroll;
padding: 30px 0 20px;
position: relative;
width: 520px;
display: block;
}
</style>
<pre>
test it: www.gbin1.com
</pre>
最佳答案
将 CSS 属性更改为
pre {
overflow:scroll !important;
}
如本例所示 http://jsfiddle.net/vTBV4/
然而,!important
标志可能不适用于所有浏览器:(但据我所知,这是确保滚动可见的唯一方法,因为 jquery animate 在要动画的元素上隐式设置内联样式 overflow: hidden
。
另一个选项可能是创建父容器并为其设置动画,而不是 <pre>
.
关于jquery - <pre>的滚动条在动画过程中会消失吗?有什么想法可以解决这个问题吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6175196/
内的和
看似不可能完成的任务。我有一个服务器输出,其中包含 内的转储。不幸的是,我碰巧转储了一个包含一些 html 标签的文件。我需要转换任何内部 HTML 实体,以便当我将数据附加到 DOM 时结构不会
标签之间的所有内容
我正在读取 .html 文件: const htmlin = String(fs.readFileSync(inputHtml) || ''); const splitted = htmlin.spl
我在 中输入了一些文本, 我输入了一些换行符、空格等。故意。但是,在提交文本并在 内呈现之后, 换行符,空格消失了,它们被类似 \r\n\r\n 的东西所取代, 怎么了?如何保持原始格式? 我
我在里面有很多内容我正在打印的标签。我正在对打印样式使用媒体查询。一切都很好,只是第一页的最后一行被剪切了。其中一半保留在第一页,另一半显示在下一页。我不知道如何将溢出转移到下一页。 最佳答案 我想通
并用括起来是否安全?
一些用户生成的文本(可能包含脚本/代码)将向公众展示。如果我过滤掉所有 和标记并用 将结果文本括起来和 ,用户提交的脚本有机会被执行吗? 请给我一个如何破解这个保护方案的例子。 最佳答案 Is it
标签中移除
我制作了简单的 BBCode 脚本,它运行良好。但后来我使用 javascript 库来美化我在 中的代码. 现在我面临的唯一问题是 中每行代码后的标签标签。 所以问题是我怎样才能删除 在
`中删除 ``?
Markdown 中的三个反引号渲染为 ... 。更具体地说, # in markdown ```java ``` # render as ... # my expecting result
标签内的方括号 (<>) 替换除标签内的换行符
我使用 question 中提供的答案替换了 pre 标签外的所有换行符. \n(?![^) 它工作正常,直到 pre 标签中的内容有 括号。 例如,输入: Test contennt for re
标签中获取选定的文本和文本索引,其中偏移量是 pre 的开始
所以我有一个像这样的前置标签: Some content, more content. Coloured content. Some more content 我想做的是使用绑定(bind) mou
我正在开发一个 android 项目,我们在其中使用 ant 构建我们的版本。在更改代码中的 versionName 和其他一些标志时,我们使用 Android-ant 目标 -pre-compile
"); ..... 回显 (""); ?> 是什么意思?
问题是标签 我看过我正在编写的一个脚本,并使用了它: echo (""); ........ echo (""); 它到底做了什么? 它是 Html 标签还是 PHP? 我在 Google 上进行了
我想知道哪些语言和工具(调试器、IDE、分析器、库等)可供想要为 Palm Pre 开发的人使用。 另外,我想知道存在哪些必须注意的技术限制。 最佳答案 有一个 JavaScript 函数库,用于与基
我目前有一个简单的 pre-commit 钩子(Hook)用于我的项目(在 R 中,虽然这是这个问题的附带),它运行单元测试: #!/bin/sh a=$(Rscript tests/testthat
我目前有一个简单的 pre-commit 钩子(Hook)用于我的项目(在 R 中,虽然这是这个问题的附带),它运行单元测试: #!/bin/sh a=$(Rscript tests/testthat
标签中的文本的空白缩进,不包括文档中标签的当前缩进级别?
我试图在网站上显示我的代码,但在正确保留空格缩进时遇到问题。 例如给定以下片段: Here is my code: def some_funtion ret
"的快捷方式 ;print_r($myarray);echo "";
是否有快捷方式 echo ""; print_r($myarray); echo ""; 为了获得数组的可读格式而键入这些内容真的很烦人。 最佳答案 这是最短的: echo '',print_r
我有一个简单的 python 项目,目前只有一个文件。它存在于我的项目的 static/cgi-bin 文件夹中。目前,在我的目录的底部,我有一个 .pre-commit-config.yaml 文件
Moses Tokenizer是广泛应用于机器翻译和自然语言处理实验的分词器。 有一行正则表达式检查: if (($pre =~ /\./ && $pre =~ /\p{IsAlpha}/) ||
在我的一个 PHP 网站上,我需要为我的用户提供选择某些行以从网站上的所有搜索结果(查询)中排除的功能。 我应该采取哪种方式来处理排除,我应该: 1) 每当用户登录(或通过查询更新它)时,预编译排除行
考虑以下代码段。 <p class="text-centre"> </bHello World></b> </p> 然后我有另一个div如下 正如您在第一个 div 中
我是一名优秀的程序员,十分优秀!