我想使用CSS的属性:
mix-blend-mode: soft-light;
Run Code Online (Sandbox Code Playgroud)
And I will test by Modernizr for fallback bla bla...
Tested :
Modernizr.mixblendmode //undefined
Modernizr.testProp('mixblendmode'); //false
Modernizr.addTest('mixblendmode'); // no-mixblendmode
Run Code Online (Sandbox Code Playgroud)
What am I missing ?
Tested on Firefox, CSS its work, but how to test with Modernizr ?
关于使用Vue (vue-loader) + Webpack和Chromatism
示例:(在开发/源代码上)
let textColor = chromatism.contrastRatio('#ffea00').cssrgb // => rgb(0,0,0)
Run Code Online (Sandbox Code Playgroud)
是否可以告诉的WebPack转换到rgb(0,0,0)
对内部版本?
因此,构建版本应该转换为:(用于性能)
let textColor = 'rgb(0,0,0)'
Run Code Online (Sandbox Code Playgroud) 我试图将一些数据设为小写(总是小写)
我制作和搜索输入如下:
<template id="search">
<div>
<input type="text" v-model="search">
<li v-show="'hello'.includes(search) && search !== ''">Hello</li>
</div>
</template>
Run Code Online (Sandbox Code Playgroud)
Vuejs :(组件)
Vue.component('search', {
template : '#search',
data: function(){return{
search : '',
}}
});
Run Code Online (Sandbox Code Playgroud)
我试过了watch
,但是我不希望输入时输入显示小写
watch: {
'search' : function(v) {
this.search = v.toLowerCase().trim();
}
}
Run Code Online (Sandbox Code Playgroud)
演示: https ://jsfiddle.net/rgr2vnjp/
我不想.toLowerCase()
在搜索列表上添加v-show
如下:
<li v-show="'hello'.includes(search.toLowerCase()) && search !== ''">Hello</li>
Run Code Online (Sandbox Code Playgroud)
任何诡计?,我搜索过,很多人告诉我们使用filter
但不会退出Vuejs 2
游乐场: https ://jsfiddle.net/zufo5mhq/(尝试输入H)
PS:好的/更好的代码我也想知道,谢谢
我只是想知道为什么在CSS中使用unicode时我不能在 unicode 之后放置空格 :
这是我的测试:
div {font-size:50px;}
div:before, div:after {color:green;}
.a:before {content: 'text-before \2022 ';}
.b:before {content: 'text-before • ';}
.c:after {content: ' \2022 text-after';}
.d:after {content: ' • text-after';}
Run Code Online (Sandbox Code Playgroud)
<div class="a">A-Hello</div>
<div class="b">B-Hello</div>
<div class="c">C-Hello</div>
<div class="d">D-Hello</div>
Run Code Online (Sandbox Code Playgroud)
所以你会看到B
并D
使用非unicode允许在char之后添加空格.但是当使用unicode(A
和C
)空格时就消失了.
.x:before {content: '\2022 ';}
Run Code Online (Sandbox Code Playgroud)
<div class="x">Hello</div>
Run Code Online (Sandbox Code Playgroud)
所以问题是:为什么以及如何在uncicode之后添加真正的空间字符(因为我们在键盘上按下空格键)?(不使用边距填充)
$(".one").position({
"my": "right top",
"at": "right top",
"of": $(".main"),
});
Run Code Online (Sandbox Code Playgroud)
当我调整窗口大小时,我需要将我的盒子保持在右上方...我尝试使用"碰撞":"合身".....它不起作用
HTML:
<li>Tue, 15th May 2012 10:11</li>
<li>Tue, 15th May 2012 10:12</li>
<li>Tue, 15th May 2012 10:13</li>
<li>Tue, 15th May 2012 10:14</li>
<li>Tue, 15th May 2012 10:15</li>
<li>Tue, 16th May 2012 21:08</li>
<li>Tue, 16th May 2012 21:07</li>
<li>Tue, 16th May 2012 21:06</li>
<code></code>
Run Code Online (Sandbox Code Playgroud)
jQuery:
$("li").each(function () {
words = $(this).text().split(' ');
xxx = words[1]+" "+words[2]+" "+words[3]+",";
$("code").append(xxx);
});
Run Code Online (Sandbox Code Playgroud)
我现在来到这一步,但我不知道如何检查重复日期并附加唯一日期
我只想检查该链接是否是 Google 地图链接
例如 :
var urls =[
/// correct urls
"https://www.google.com/maps",
"https://www.google.fr/maps",
"https://google.fr/maps",
"http://google.fr/maps",
"https://www.google.de/maps",
"https://www.google.com/maps?ll=37.0625,-95.677068&spn=45.197878,93.076172&t=h&z=4",
"https://www.google.de/maps?ll=37.0625,-95.677068&spn=45.197878,93.076172&t=h&z=4",
"https://www.google.com/maps?ll=37.0625,-95.677068&spn=45.197878,93.076172&t=h&z=4&layer=t&lci=com.panoramio.all,com.google.webcams,weather",
"https://www.google.com/maps?ll=37.370157,0.615234&spn=45.047033,93.076172&t=m&z=4&layer=t",
"https://www.google.com/maps?ll=37.0625,-95.677068&spn=45.197878,93.076172&t=h&z=4",
"https://www.google.de/maps?ll=37.0625,-95.677068&spn=45.197878,93.076172&t=h&z=4",
"https://www.google.com/maps?ll=37.0625,-95.677068&spn=45.197878,93.076172&t=h&z=4&layer=t&lci=com.panoramio.all,com.google.webcams,weather",
"https://www.google.com/maps?ll=37.370157,0.615234&spn=45.047033,93.076172&t=m&z=4&layer=t",
/// error urls
"https://www.google.com/",
"https://zzz.google.com/maps",
"https://www.google.com/+",
"httpsxyz://www.google.com/maps",
"http://www.anotherdomain.com/+"
];
Run Code Online (Sandbox Code Playgroud)
我对正则表达式很不满意,并尝试使用 JavaScript 正则表达式生成器,但它对我来说仍然很难。
我只得到了..
Reg = /^http\:\/\/|https\:\/\/|www\.google$/;
Run Code Online (Sandbox Code Playgroud)
它失败了!:(
但我为大家进行了现场测试:http://jsbin.com/onuyux/1/edit ?javascript,live
编辑:2
在我得到@joel harkes
&@dan1111
所以我得到了正则表达式的帮助之后
/^https?\:\/\/(www\.)?google\.[a-z]+\/maps\b/
Run Code Online (Sandbox Code Playgroud)
这只是正则表达式google.{TLD}/maps
,那么maps.google.{TLD} 又如何呢?
我只想通过这种方式验证 Google 地图 URL 和 URL (看图片)
如果可能的话,我想验证是否设置了地址或长纬度(使用li
或q
参数检查?)(不仅仅是“maps.google.com”例如..)
更新列表+代码:
/// correct urls
"https://www.google.com/maps?ll=37.0625,-95.677068&spn=45.197878,93.076172&t=h&z=4",
"https://www.google.de/maps?ll=37.0625,-95.677068&spn=45.197878,93.076172&t=h&z=4",
"https://www.google.com/maps?ll=37.0625,-95.677068&spn=45.197878,93.076172&t=h&z=4&layer=t&lci=com.panoramio.all,com.google.webcams,weather",
"https://www.google.com/maps?ll=37.370157,0.615234&spn=45.047033,93.076172&t=m&z=4&layer=t",
"https://maps.google.com/maps?q=New+York,+NY,+USA&hl=no&sll=19.808054,-63.720703&sspn=54.337928,93.076172&oq=n&hnear=New+York&t=m&z=10",
"https://www.google.com/maps?q=New+York,+New+York,+USA&hl=no&ll=40.683762,-73.925629&spn=0.708146,1.454315&sll=41.47566,-72.026367&sspn=11.190693,23.269043&oq=new&hnear=New+York&t=m&z=10", …
Run Code Online (Sandbox Code Playgroud) 示例'BLACK STAR'★(U + 2605)
.a:after {
content: "\2605";
position:absolute;
}
.b:after {
content: "?";
position:absolute;
}
Run Code Online (Sandbox Code Playgroud)
演示: http ://jsfiddle.net/l2aelba/vBjxX/
为什么有人/最推荐使用HEX像\2605
在CSS值?两者都得到相同的结果.
为什么我可以做if else shorthand
内部.push()
功能?喜欢
var arr = [];
arr.push(test||null);
// nothing
Run Code Online (Sandbox Code Playgroud)
但
var arr = [];
var test = test||null;
arr.push(test);
// [null]
Run Code Online (Sandbox Code Playgroud)
null
如果变量未定义,我需要插入。
为什么我不能使用test||null
内部.push()
函数?
我们如何通过普通文本输入接受/触发图像键盘(如 Android 上的 GIF 键盘)?
HTML:
<input type="text">
Run Code Online (Sandbox Code Playgroud)
当我尝试插入 gif 时,我得到
无法在此处输入此内容。
所以问题是我们如何触发用户插入一些 GIF 图像?
喜欢...
<input type="text" accept="..." oninput="...">
Run Code Online (Sandbox Code Playgroud)
这个有可能?
资源: https : //developer.android.com/guide/topics/text/image-keyboard
javascript ×6
css ×3
css3 ×2
jquery ×2
vue.js ×2
array-push ×1
arrays ×1
blending ×1
char ×1
character ×1
css-content ×1
duplicates ×1
get ×1
gif ×1
glyph ×1
google-maps ×1
hex ×1
html ×1
html-input ×1
if-statement ×1
image ×1
lowercase ×1
modernizr ×1
performance ×1
position ×1
push ×1
regex ×1
resize ×1
text ×1
unicode ×1
url ×1
validation ×1
variables ×1
webpack ×1