我正在使用alvarotrigo.com/fullPage/获得漂亮的整页效果.我也在使用bootstrap 3网格系统,它看起来像:
<section id="section" class="section">
<div class="home">
<div class="container-fluid position-relative">
<div class="row">
<div class="col-sm-4">
</div>
<div class="col-sm-4">
</div>
<div class="col-sm-4">
</div>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
现在,我们看到3列,全部都是封闭的,这个html创建了3个coluns视图,没关系.
但对于较小的视口,这三列,转换为3个全宽列,这是问题,因为全页,js现在跳过第二和第三列滚动,所以如果我滚动到#section,我只看到第一个div,如果我向下滚动,动画将转到另一个部分,跳过2和3 div.我创造了简单的插图.
div 2和div 3显示为灰色,表示在动画过程中将跳过这些div.
我的问题是,我可以在fullpage.js上进行设置或进行一些调整,因此脚本会在向下滚动后显示这些div吗?
谢谢.
我正在寻找使用css3动画存档效果的简洁方法:
我有div,它有css风格:
background-image:url('image.png');
background-size:cover;
/* Just to note this page has 100% width and 100% height */
width:100%;
height:100;
Run Code Online (Sandbox Code Playgroud)
这两条规则,使图像全屏.现在,我正在寻找一种方法,创造缩放的效果,让我们说5秒钟.因此,用户在页面加载时会看到整页背景,它越来越小,但所有时间都是100%的宽度和高度.
我找到了一些例子,但大多数都使用:悬停效果,我希望在页面加载时有动画.
谢谢你的建议.
我从最新版本的nativescript开始。
我已经完成了官方页面上的教程,但是现在我的问题比答案更多。
谁能告诉我,我可以使用什么策略来设置一些变量,例如成功登录后如何设置变量甚至更好,如何运行一些在全局进行检查的功能,而不是在每个视图或模型文件上?我看到app.js是应用程序的起点,但看起来它无法进行任何全局检查?
我认为,第二个问题是有关的:几乎每个模型视图文件(称为{viewname}的文件).js都在使用:
var frameModule = require('ui/frame');
Run Code Online (Sandbox Code Playgroud)
有没有办法宣布一次?还是我每次需要框架方法时都必须运行此程序?或者,如果可能的话,会导致性能不佳?
感谢您的任何建议。
我有疑问,为什么JQuery忽略.not在这段代码中:
$('body').not('#footer').on('click',function(){
if (($('#footer')).is(":visible")) {
$('#footer').fadeOut();
}
});
Run Code Online (Sandbox Code Playgroud)
基本上,我想关闭#footer,但只能点击除#footer之外的其他元素.上面的代码完成了他的工作,但点击#footer也fadeOut这个元素,这是不希望的.
在另一方面,这将工作:
$('div').not('#footer').on('click',function(){
if (($('#footer')).is(":visible")) {
$('#footer').fadeOut();
}
});
Run Code Online (Sandbox Code Playgroud)
现在的缺点是,如果我点击#footer里面的div,这也会关闭它,所以不是完美的解决方案.
我的问题是,我如何能够锁定所有元素来关闭#footer,而不是#footer和他的孩子.
谢谢你的建议.
我使用过这个选择器:$('body').children().not('#footer').on('click',function(){上面这个,现在关闭#footer只有当我点击身体而不#页脚本身.
我遇到了一些数学问题.我有这个简单的数组:
var x = [
{
'index':0,
"place": 1,
},
{
'index':1,
"place": 4,
},
{
'index':0,
"place": 9,
},
{
'index':1,
"place": 9,
},
{
'index':0,
"place": 9,
},
];
Run Code Online (Sandbox Code Playgroud)
如何遍历此数组并row在数组中的每个对象中添加一个元素(在本例中称为)?它应该看起来像这样:
var x = [
{
'index':0,
"place": 1,
"row":"0",
},
{
'index':1,
"place": 4,
"row":"0",
},
{
'index':0,
"place": 9,
"row":"1",
},
{
'index':1,
"place": 9,
"row":"1",
},
{
'index':0,
"place": 9,
"row":"2",
},
{
'index':0,
"place": 9,
"row":"2",
},
];
Run Code Online (Sandbox Code Playgroud)
谢谢你的建议.我需要这个在NativeScript中创建动态网格布局.
javascript ×3
arrays ×1
css ×1
css3 ×1
fullpage.js ×1
html ×1
html5 ×1
jquery ×1
nativescript ×1