有没有机会将图像放在六边形内?我已经习惯了html中的六角形单元格,但是我不能用它来填充(背景?)图像.
这是我尝试过的:
.top {
height: 0;
width: 0;
display: block;
border: 20px solid red;
border-top-color: transparent;
border-right-color: transparent;
border-bottom-color: red;
border-left-color: transparent;
}
.middle {
height: 20px;
background: red;
width: 40px;
display: block;
}
.bottom {
height: 0;
width: 0;
display: block;
border: 20px solid red;
border-top-color: red;
border-right-color: transparent;
border-bottom-color: transparent;
border-left-color: transparent;
}Run Code Online (Sandbox Code Playgroud)
<div class="hexagon pic">
<span class="top" style="background: url(http://placekitten.com/400/400/)"></span>
<span class="middle" style="background: url(http://placekitten.com/400/400/)"></span>
<span class="bottom" style="background: url(http://placekitten.com/400/400/)"></span>
</div>
<div class="hexagon">
<span class="top" style="overflow: hidden;"><img src="http://placekitten.com/400/400/" …Run Code Online (Sandbox Code Playgroud)嗨,谢谢你的访问.我目前正在为wordpress编写插件.我需要一个特定页面内的按钮,触发电子邮件通知.我认为使用woocommerce电子邮件功能会很好,因为它是一封客户电子邮件,我也想使用woocommerce-email-templates.
在我的插件中,我包括我的课程扩展名
function add_wc_custom_email( $email_classes ) {
require( 'includes/class-wc-custom-email.php' );
$email_classes['WC_Custom_Email'] = new WC_Custom_Email();
return $email_classes;
}
add_filter( 'woocommerce_email_classes', 'add_wc_custom_email' );
//if i write a print_r(something) inside this function, just to alert if this filters hits, i don't see a result, so i think the error is here.. the filter gets hit under woocommerce->settings->emails but not, if you simply load a page in the backend
Run Code Online (Sandbox Code Playgroud)
在文件类-wc-custom-email.php中我有我的类扩展
class WC_Custom_Email extends WC_Email {
public function __construct() {
…
}
public function mail( …Run Code Online (Sandbox Code Playgroud) 我想添加一个自定义字段以包含在我的搜索查询中。这是通过 完成的meta_query,我完全意识到这一点,但问题是,我不知道在哪里可以根据我的需要操纵查询参数。
所以我正在寻找一个过滤器,以进入 REST API 搜索请求 ( /wp/v2/search),有什么线索吗?