有没有办法隐藏故事板界面中的元素?我所说的就是在Photoshop中如何在工作时隐藏图层.我问,因为我有一些堆积的物品,有时在工作时不能一次看到所有东西会很好.
我试图在本教程之后使用AJAX加载基于wordpress的网站.所有代码都对我有用,但他们使用的是一个名为JS Hashchange Event的插件.我遇到的问题是,部分它使用的$.browser.msie是当我用jQuery 1.9运行它时,我得到一个Uncaught TypeError: Cannot read property 'msie' of undefined错误.我尝试添加js migrate插件但它没有用.我读到我可以添加这段代码
jQuery.browser={};(function(){jQuery.browser.msie=false;
jQuery.browser.version=0;if(navigator.userAgent.match(/MSIE ([0-9]+)\./)){
jQuery.browser.msie=true;jQuery.browser.version=RegExp.$1;}})();
Run Code Online (Sandbox Code Playgroud)
但不知道在哪里放.有谁有这个问题?或者更好的方法是使用AJAX加载wordpress页面(保持页眉和页脚静态)?
我很困惑,也许这是我看不到的简单事情.如果我想看看今天的日期是否过去,我应该能够做到这样的事情吗?
if( $league->date_start <= Carbon::now() ){
$join = false;
$message = 'Sorry, the league has already started';
}
Run Code Online (Sandbox Code Playgroud)
如果我把它的日期转出来
$league->date_start = 2017-07-31 00:00:00
Carbon::now() = 2017-11-01 16:29:27
Run Code Online (Sandbox Code Playgroud)
$league->date_start 是一个受保护的日期,所以它是一个碳实例
但这不起作用,如果我切换到$league->date_start >= Carbon::now()它工作,不会让我加入.我知道"联盟"的开始日期是过去所以不应该是$league->date_start <= Carbon::now()?????
是否可以在组件的样式标签中使用变量?基本上,我已经将mixin导入到我的样式标签中,该标签接受2种颜色以在类中创建渐变。它很好用,但是我希望它具有动态性,因此可以通过数据库进行设置。我知道我可以通过内联来绑定样式,但是div的渐变相当长,并且作为mixin效果更好。
零件:
<template>
<section class="section" v-bind:class=" { 'color-section' : content.gradient_color_one }">
<div class="container">
<div class="columns">
<div class="column is-half">
<h2 class="is-size-4" v-html="content.title"></h2>
<div class="section-content" v-html="content.description"></div>
<a class="button" :href=" '/'+ content.button_link">{{ content.button_text }}</a>
</div>
<div class="column">
<img :src="content.image" :alt="content.title" />
</div>
</div>
</div>
</section>
</template>
<script>
export default {
props:[
'content'
],
}
</script>
<style lang="scss" scoped>
@import "../../sass/helpers/mixins";
.color-section{
color:red;
@include diagonalGradient( content.gradient_color_one , content.gradient_color_two);
}
</style>
Run Code Online (Sandbox Code Playgroud)
混合蛋白
@mixin diagonalGradient($top, $bottom){
background: $top;
background: -moz-linear-gradient(-45deg, $top 0%, $bottom 100%);
background: -webkit-gradient(left …Run Code Online (Sandbox Code Playgroud) 我正在尝试通过Composer安装需要PHP 5.6.0的软件包.我的MAC运行PHP 5.5.31,但MAMP运行PHP 7.0.该软件包将无法下载,因为它不满足PHP要求,因为它正在查看我的macOS版本,而不是我实际使用MAMP的版本.我怎么能绕过这个?
当有人点击主导航链接时,我试图将一些jQuery挂钩到我的导航以淡入和退出页面包装器.代码本身工作正常,但只有2个问题:
任何帮助都会很棒.谢谢!!
JS
$(document).ready(function() {
$('#page-wrap').css('display', 'none');
$('#page-wrap').delay(500).fadeIn(1000);
$('.menu-item').click(function(event) {
event.preventDefault();
newLocation = this.href;
$('#page-wrap').fadeOut(1000, newpage);
});
function newpage() {
window.location = newLocation;
}
});
Run Code Online (Sandbox Code Playgroud)
导航的代码(使用wordpress)
<div id="nav_wrap">
<div id="nav"><?php wp_nav_menu( array( 'theme_location' => 'header-menu',) ); ?></div>
</div>
Run Code Online (Sandbox Code Playgroud) 我写了一些代码,用于提醒手机上的用户改变为横向,基本上是肖像.这很有效,但如果用户在横向开始,它显然没有显示,因为没有方向改变.有没有办法让你得到的方向?
$(window).on("orientationchange",function(){
if( (window.orientation == 90 && $( window ).width() < 780) || (window.orientation == -90 && $( window ).width() < 780) ) // Landscape
{
$('body').append('<div class="phoneLandscape"><h4>Sorry, this site is best viewed in Portrait Mode</h4></div>');
}
else // Portrait
{
$('.phoneLandscape').remove();
}
});
Run Code Online (Sandbox Code Playgroud) 当尝试使用 SQL pro 进入远程数据库时,我收到此错误。它时不时地工作,不确定发生了什么。
我现在也遇到了 GIT 的这个问题,它要求我输入密码。
我已经更新了 dev/tty 的权限,尝试删除known_hosts、检查~/ssh/并添加authorized_keys文件的权限。什么都不起作用。
错误:
Used command: /usr/bin/ssh -v -N -S none -o ControlMaster=no -o ExitOnForwardFailure=yes -o ConnectTimeout=10 -o NumberOfPasswordPrompts=3 -i /Users/PackyTagliaferro/.ssh/id_rsa.pub -o TCPKeepAlive=no -o ServerAliveInterval=60 -o ServerAliveCountMax=1 -p 22 forge@107.170.236.120 -L 58527:127.0.0.1:3306 -L 58528:107.170.236.120:3306
OpenSSH_7.3p1, LibreSSL 2.4.1
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: Control socket " none" does not exist
debug1: Connecting to 107.170.236.120 [107.170.236.120] port 22.
debug1: fd …Run Code Online (Sandbox Code Playgroud) 所以我有一个使用Vue和Vue路由器的SPA。它的设置类似于iOS应用,当您在视图中单击得更深时,导航栏中的标题就会更改。现在,我已经在routes.js文件中对此进行了硬编码,但希望使它成为动态的。我可以在视图中更新路线元,但是会在视图显示后进行渲染,因此我需要在更改路线之前进行。这是设置:
route.js
//A route
{
path: '/team/:username',
component: require('./views/team-single'),
name: 'profile',
meta:{ requiresAuth: true, title: 'Team Member', tabbar: false }
}
Run Code Online (Sandbox Code Playgroud)
导航栏
//if the route has a title show that not the logo
<div class="navbar-item">
<transition name="fadeup">
<h1 v-if="$route.meta.title" class="navbar-title">{{ $route.meta.title }}</h1>
<img src="/img/hopbak-green.svg" class="navbar-logo" alt="hopbak" v-else>
</transition>
</div>
Run Code Online (Sandbox Code Playgroud)
因此,理想情况下,最好将:username传递到route.js的标题中,但我认为这不可能。我曾尝试在视图中添加类似的内容,但是就像我说的那样,它被调用到很晚:
团队成员
mounted(){
this.$route.meta.title = this.user.username
}
Run Code Online (Sandbox Code Playgroud)
确实会更改它,但不会在导航栏加载之前更改。
任何人都可以帮忙解决这个问题吗?建议我像下面一样设置我的文件,以便单击图像会触发未显示的 HTML5 全屏视频,但我收到函数错误。我需要包含一些库吗?似乎无法识别该命令requestFullscreen。
<body>
<div class="slide" id="">
<img src="../root/img/gc_small.png" id="videoPlay" style="margin:200px 0 0 0;">
</div>
<video autoplay loop muted controls="false" id="myVideo" style="width:800px;">
<source src="video/portal.mp4" type="video/mp4">
</video>
</body>
Run Code Online (Sandbox Code Playgroud)
JS
<script type="text/javascript">
$(function() {
$('#videoPlay').on('click', function(event) {
event.preventDefault();
$('#myVideo').requestFullscreen();
});
});
</script>
Run Code Online (Sandbox Code Playgroud) jquery ×4
html ×2
javascript ×2
php ×2
vue.js ×2
ajax ×1
composer-php ×1
css ×1
git ×1
ios ×1
laravel ×1
mamp ×1
php-carbon ×1
scope ×1
ssh ×1
ssh-keys ×1
storyboard ×1
vue-router ×1
wordpress ×1
xcode ×1