我做了一个按钮组,并希望当用户选择上一个或下一个按钮的每个按钮背景移动/滑动到选定的一个时,我用纯粹的这个效果,css只是用来jquery添加或删除active类.现在问题是当你点击All按钮,然后New它工作正常,但如果你点击Used幻灯片不能正常工作.
这种效果,我用transition和::before,需要用纯水来解决这个css或最小的jquery,而不是大量的javascript或jquery代码.
移动此背景的逻辑是:
.RadioButton .btn:first-child::before {
right: 0;
transition: .3s all ease;
}
.RadioButton .btn:nth-child(2)::before {
transition: .3s all ease;
}
.RadioButton .btn:last-child::before {
left: 0;
transition: .3s all ease;
}
Run Code Online (Sandbox Code Playgroud)
.RadioButton .btn:nth-child(2)::before我的问题不能使用right:0或left:0因为如果我使用每一个,幻灯片效果不能在正确的位置,任何解决方案吗?
到目前为止我尝试了什么:
$('.RadioButton').each(function(){
$(this).find('.btn').each(function(){
$(this).click(function(){
$(this).parent().find('.btn').removeClass('btn-active');
$(this).addClass('btn-active');
});
});
});Run Code Online (Sandbox Code Playgroud)
body {
direction: rtl;
}
.RadioButton .btn {
width: 33%;
float: …Run Code Online (Sandbox Code Playgroud)是否robots.txt接受正则表达式?我有很多URL这种格式的:
https://example.com/view/99/title-sample-text
ID ----------------------^
Title -----------------------------^
Run Code Online (Sandbox Code Playgroud)
我用过这个:
Disallow: /view
Run Code Online (Sandbox Code Playgroud)
但是看起来这不起作用,因为google索引了更多页面。所以我想用正则表达式来做到这一点,就像这样:
Disallow: /view/([0-9]+)/([^/]*)
Run Code Online (Sandbox Code Playgroud)
但这是正确的格式还是在 中有效robots.txt?