当悬停链接时,我希望它获得下划线.下划线应该是2px强,比文本低4px.
同
text-decoration: underline
Run Code Online (Sandbox Code Playgroud)
我得到1px强线,低于4px.(距离因字体而异)
如果我写
border-bottom: 2px solid #000;
Run Code Online (Sandbox Code Playgroud)
我得到一条2px线,比文本低10px.
如何减少文本和边框之间的距离?
padding-bottom: -6px
Run Code Online (Sandbox Code Playgroud)
不起作用.padding-bottom的任何负值都不起作用.
或者我怎样才能使下划线强2px?
我正在尝试按需构建自定义 zip 文件,并发现一些代码似乎工作正常 http://www.9lessons.info/2012/06/creating-zip-file-with-php.html
我已将代码插入到我的 WordPress 模板中,唯一的事情是header()
必须在加载模板之前发送
我怎样才能用 WordPress 做到这一点?
这是带有标题的代码
$zip = new ZipArchive(); // Load zip library
$zip_name = time().".zip"; // Zip name
if($zip->open($zip_name, ZIPARCHIVE::CREATE)!==TRUE){ // Opening zip file to load files
$error .= "* Sorry ZIP creation failed at this time<br/>";
}
foreach($post['files'] as $file){
$zip->addFile($file_folder.$file); // Adding files into zip
}
$zip->close();
if(file_exists($zip_name)){
// push to download the zip
header('Content-type: application/zip');
header('Content-Disposition: attachment; filename="'.$zip_name.'"');
readfile($zip_name);
// remove zip file is exists in temp path …Run Code Online (Sandbox Code Playgroud) 为了分离导航中的链接,我设置了以下内容
#menu-main li a:after{
content: " * ";
}
Run Code Online (Sandbox Code Playgroud)
当前项目获得额外的
text-decoration: underline;
Run Code Online (Sandbox Code Playgroud)
我现在的问题是,"*"也有下划线,但不应该
我试过补充一下
#menu-main li a:after{
text-decoration: none !important;
}
Run Code Online (Sandbox Code Playgroud)
但它没有效果
有没有人知道如何保持文字下划线但不是:内容后?
我正在尝试使用Shopify API从集合中删除产品.
在docs(https://docs.shopify.com/api/collect)概述中,它说:
DELETE /admin/collects/#{id}.json
Remove a Collect from the database
Run Code Online (Sandbox Code Playgroud)
当你跳到描述时它会说:
Remove a product from a collection
Destroy the link between a product an a collection
DELETE /admin/collects/#{id}.json
Run Code Online (Sandbox Code Playgroud)
那么我可以使用它来从集合中删除产品或从数据库中删除集合吗?
如果可以从集合中删除产品 - 我想要做什么 - 我应该传递集合ID还是产品ID - 实际上我认为我必须通过这两者,否则它将如何运作?
谢谢你的帮助!
我有一个弹性搜索索引,用于存储有关人员的信息.为了找到特定的人我有一些问题,每个人都可以单独工作但是当我使用Bool Query将它们组合起来时,我得到一个错误.
其中一个查询是模糊搜索名称
{
"query": {
"fuzzy_like_this": {
"fields": [
"firstname",
"lastname"
],
"like_text": "Peter"
}
}
}
Run Code Online (Sandbox Code Playgroud)
另一个问题是搜索出生在特定日期范围内的人
{
"query": {
"range": {
"birthdate": {
"from": "1988-12-30",
"to": "1993-12-30"
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
现在我想结合这两个查询.我的布尔查询:
{
"query": {
"bool": {
"must": [
{
"query": {
"fuzzy_like_this": {
"fields": [
"firstname",
"lastname"
],
"like_text": "Peter"
}
}
},
{
"query": {
"range": {
"birthdate": {
"from": "1988-12-30",
"to": "1993-12-30"
}
}
}
}
]
}
}
}
Run Code Online (Sandbox Code Playgroud)
虽然我单独使用它们时两个查询都可以正常工作,但在组合它们时我会收到错误.在我的索引中有人名字是彼得并且出生在这个日期范围内,但即使找不到人,我也应该得到0结果而不是错误.
错误说:"error":"SearchPhaseExecutionException [无法执行阶段[查询],所有分片都失败;嵌套:QueryParsingException [[indexname]没有为[query]注册查询] …
css ×2
underline ×2
api ×1
booleanquery ×1
border ×1
css-content ×1
http-headers ×1
pseudo-class ×1
shopify ×1
wordpress ×1