我有按钮来放大或缩小内容。在 Firefox 光标中效果很好(它就像带有 的放大镜+)。但在 chrome 中我有默认光标。这是我的代码:
.button.zoom-in {
...
cursor: zoom-in;
}
Run Code Online (Sandbox Code Playgroud)
有人可以帮助我,为什么它在forefox 和chrome 中不起作用?此外,帮助、移动、指针等其他光标也适用于 chrome。
我试图show()在相同的比例效果上重现hide().我使用相同的参数,但效果不一样:
$('.div1').show('scale', {
direction: "horizontal",
duration: 1000
});
$('.div2').hide('scale', {
direction: "horizontal",
duration: 1000
});
Run Code Online (Sandbox Code Playgroud)
这是创建新路由的简单测试脚本:
add_action( 'rest_api_init', function () {
register_rest_route( 'ass', '/ativar', array(
'methods' => 'GET',
'callback' => 'testing_route',
) );
} );
function testing_route($data){
return array( 'message' => 'testing route' );
}
Run Code Online (Sandbox Code Playgroud)
但它返回一条错误消息:
rest_invalid_handler
我想摆脱内容和导航栏之间的空间,我该怎么做?请告诉我如何做到这一点,请我是 css 和 html 的新手。我还尝试将它用于图像滑块上的 wordpress 导航栏和图像滑块之间有空间我如何摆脱它?先感谢您。
这是我的导航栏和内容的 html 代码。
<nav class="navbar navbar-default navbar-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#nav-collapse">
<span class="icon-bar" ></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<img class="img-responsive" src="images/brandz.png" >
</div>
<div class="collapse navbar-collapse" id="nav-collapse">
<ul class="nav navbar-nav">
<li><a href="#">Students</a></li>
<li><a href="#">Faculty</a></li>
<li><a href="#">Contact us</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a data-toggle="modal" href="#myModal" ><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button …Run Code Online (Sandbox Code Playgroud) 在我的刀片编辑表单中,我有这个:
<input type="text" name="birth" class="form-control" id="birth" value="{{ \Carbon\Carbon::parse($associado->birth)->format('d/m/Y') }}">
Run Code Online (Sandbox Code Playgroud)
问题是:如果$associado->birth数据库中为 NULL,Carbon 将返回当前日期。
我可以做什么来避免这种情况?
这是我的 ProducerType 模型控制器:
namespace App\Http\Controllers;
use App\ProducerType;
use App\Http\Requests\ValidateProducerTypes;
use Illuminate\Http\Request;
class ProducerTypeController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
...
public function destroy(ProducerType $producerType)
{
$producerType->delete();
return redirect('/producers');
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的模型:
namespace App;
use Illuminate\Database\Eloquent\Model;
class ProducerType extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'nome'
];
}
Run Code Online (Sandbox Code Playgroud)
看法:
<form action="/producers-type/{{ $type->id }}" method="POST">
@csrf
@method('DELETE')
<button type="submit" class="btn-icon">
<img src="{{ asset('images/times-circle-regular.svg') }}" alt="">
</button> …Run Code Online (Sandbox Code Playgroud) 每次更改一个选择时,我都会尝试返回值的总和.但总和总是错误的:
$('select').change(function () {
a = 0;
$('select').each(function () {
a += parseInt($('option:selected').val(), 10);
});
$('h1 span').html(a);
});
Run Code Online (Sandbox Code Playgroud)
我有以下mixin:
.iconFont(@color: @green, @font-size: 18px){
color: @color;
font-size: @font-size;
}
Run Code Online (Sandbox Code Playgroud)
如果我只想更改第二个变量值,我需要写第一个变量默认值吗?
h1{
.iconFont(@green, 14px);
}
Run Code Online (Sandbox Code Playgroud) 我有这两个 WordPress 功能:
$wpb_set_post_views = function($postID) {
$count_key = 'wpb_post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){
$count = 0;
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, '0');
}else{
$count++;
update_post_meta($postID, $count_key, $count);
}
};
add_action( 'wp_head', function ($post_id) {
if ( !is_single() ) return;
if ( empty ( $post_id) ) {
global $post;
$post_id = $post->ID;
}
$wpb_set_post_views($post_id);
});
Run Code Online (Sandbox Code Playgroud)
但是页面返回Notice: Undefined variable: wpb_set_post_views最后一行。
由于某种原因,该图表没有显示数组中的最后两个数据。
\n\nvar data = {\n labels: ["Brasil", "Argentina", "Chile", "Paraguai", "Peru", "Bol\xc3\xadvia", "M\xc3\xa9xico"],\n datasets: [{\n data: [ 9.19, 7.77, 6.80, 6.23, 6.00, 4.00, 4.00 ],\n backgroundColor: backgroundColor\n }],\n};\nRun Code Online (Sandbox Code Playgroud)\n\nhttp://codepen.io/marcelo2605/pen/PWWqJm?editors=0010
\n\n有谁知道为什么会发生这种情况?
\n我创建了一个规则来检查电子邮件是否已存在,仅当字段发生更改时。
$rules = [
'user-name' => 'required',
'user-email' => [
'required',
'email',
Rule::unique('users', 'email')->ignore(ID)
],
];
Run Code Online (Sandbox Code Playgroud)
但是我需要告知用户ID。我怎样才能获取这些信息?
Route::resource('users', 'UsersController')->middleware('permission:create users');
Run Code Online (Sandbox Code Playgroud) 我正在尝试安装需要 PHP ^7.0 的软件包。所以我将我的主机 PHP 版本从 5.6 更改为 7.0.25。运行php -v返回:
PHP 7.0.25 (cli)(构建时间:2017 年 10 月 30 日 17:10:45)(NTS)
但作曲家仍然涉及版本问题:
- spatie/laravel-backup 4.19.2 需要 php ^7.0 -> 您的 PHP 版本 (5.6.30) 不满足该要求。
我正在开始创建API,测试路由.这是我的路线/ api.php:
Route::get('/', 'ApiController@index');
Route::post('/foo', 'ApiController@store');
Run Code Online (Sandbox Code Playgroud)
这是我的ApiController.php
public function index()
{
return 'Hello, API';
}
public function store()
{
return 'API POST';
}
Run Code Online (Sandbox Code Playgroud)
在Postman上,GET方法有效.但POST返回405代码.
我的Http/Kernel.php没有限制:
protected $middlewareGroups = [
'web' => [
...
],
'api' => [
'throttle:60,1',
'bindings',
],
];
Run Code Online (Sandbox Code Playgroud)
php ×7
laravel ×4
jquery ×3
css ×2
javascript ×2
laravel-5.7 ×2
wordpress ×2
chart.js ×1
composer-php ×1
cursor ×1
each ×1
html ×1
jquery-ui ×1
laravel-5.4 ×1
less ×1
less-mixins ×1
php-5.3 ×1
php-carbon ×1