我在jsFiddle中的大多数代码:
http://jsfiddle.net/MilkyTech/suxWt/
内容应该在白色框中的第一页上加载,溢出的内容会将页面的以下部分向下推.但是,可以看出,下部加载在第一页白框的顶部.我试过改变各个部分的定位/清除但似乎无法创建必要的动作.
<section class="page1">
<div class="huge-title centered">
<div id='detailsbox'>
<h1 id='eorvtitle'></h1>
<img id='eorvimage' src=''>
<div><p>lots of text lots of text
</div>
</div>
</section>
<section class="page2" id='page2'>
</section>
.page1 {
background: url('../img/bg.jpg')#131313;
background-size: cover;
height: 100%;
position: relative;
}
.huge-title {
position: absolute;
top: -20%;
right: 0;
bottom: 0;
left: 0;
margin: auto;
width: 100%;
height: 180px;
}
#detailsbox {
top: -4em;
width: 75%;
left: 12.5%;
right: 12.5%;
border: 20px solid white;
border-radius: 10px;
background-color: white;
text-align:center;
position: absolute;
float: …Run Code Online (Sandbox Code Playgroud) 在Windows 10锁定屏幕上,设置为Windows Spotlight,有"文本框"链接,一旦您登录,它将为您提供有关该图像的更多信息.这些链接自动启动Microsoft Edge而不是我的默认浏览器 - Chrome.我到处寻找解决方案但没有成功.我已经将chrome设置为默认值,并且关联的每个文件类型chrome都可以打开,但仍会打开Edge.如果我转到Edge的文件/协议关联,除了URL:microsoft-edge和URL:read之外,所有内容都是未选中的.它不会让我取消选中这些协议,虽然我不知道这些是否是罪魁祸首.如果我转到"按协议选择默认应用程序",我无法选择安装在我的计算机上的应用程序,但只有选项是当前的默认应用程序或在商店中查找应用程序.
使用jquery缩放一些文本,mousemove但无法弄清楚如何使右侧的单词(h2)从固定的右侧位置向左侧缩放。相反,它总是从单词的左边缘开始缩放。
我希望这两个单词组合起来始终填充窗口的宽度,当光标向左移动时,左侧单词(h1)缩小,右侧单词(h2)增大,反之亦然。
还有一个问题是,我使用一些脚本将每个单词缩放到 document.ready 上窗口宽度的 50%,但正确的单词 (h2) 又根据 css 字体大小从其原始位置缩放,因此缩小了这一页。
使用text-align: right没有效果。如何将正确的单词保留在窗口中并向左扩展?jsFiddle
var originwidth = $('h1').width()
var originheight = $('h1').height()
var origh1scalex = $(window).width()/2 / $('h1').width()
var origh2scalex = $(window).width()/2 / $('h2').width()
$(function() {
$('h1').css('transform', 'scaleX(' + origh1scalex + ')');
$('h2').css('transform', 'scaleX(' + origh1scalex + ')');
});
$(document).on('mousemove', function(event) {
var scaleX = event.pageX / originwidth
var scaleY = event.pageY / originheight
$('h1').css('transform', 'scale(' + scaleX + ',' + scaleY + ')')
})
var originwidth …Run Code Online (Sandbox Code Playgroud)这很好用,但不幸的是它在全球范围内应用。我想将 css 应用于特定的页面 ID (75)。如果我通过块编辑器中的高级选项卡添加一个类,它会中断,没有列表图标。
.entry-content ul > li::before {
content: '\f0da';
color: #a86500;
font-family: 'Font Awesome 5 Free';
padding: 0 10px 0 0;
}
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
我有一个倒计时的网页,并重定向到上一页,效果很好,但我想要关闭页面(当前浏览器选项卡),而不是重定向到上一页.消失.自毁.我试过替换我的重定向history.go(-1),window.close()但它没有用.
JS:
var countdownfrom=9
var currentsecond=document.redirect.redirect2.value=countdownfrom+1
function countredirect(){
if (currentsecond!=1){
currentsecond-=1
document.redirect.redirect2.value=currentsecond
}
else{
history.go(-1)
return
}
setTimeout("countredirect()",1000)
}
countredirect()
Run Code Online (Sandbox Code Playgroud)
HTML:
<form name="redirect">
<h1>Oops! I think you meant to use a URL...</h1>
<h2>this page will self destruct in</h2>
<form>
<input type="text" size="1" name="redirect2">
</form>
<h2>seconds</h2>
<h3>Go back to where you came from and try again!</h3>
Run Code Online (Sandbox Code Playgroud)
html看起来不正确,你甚至可以将表单嵌套在另一个表单中吗?它工作正常.
<h1>Oops! I think you meant to use a URL...</h1>
<h2>this page will self destruct in</h2>
<form name="redirect">
<input type="text" …Run Code Online (Sandbox Code Playgroud) css ×3
html ×3
jquery ×2
javascript ×1
lockscreen ×1
redirect ×1
scale ×1
transform ×1
windows-10 ×1
wordpress ×1