我有以下情况:
1)我有一个内部静态类,我的软件初始化一个表单2)我想得到这个表单的实例用于其他原因.
代码示例:
1类:
namespace x {
internal static class Program {
private static Form mainx;
private static void Main() {
.....
.....
mainx=new Form(.....);
Application.run(mainx);
}
}
}
Run Code Online (Sandbox Code Playgroud)
Class2:我想用这样的东西:
Form1 try=Program.mainx;
Run Code Online (Sandbox Code Playgroud)
我该怎么做?
我想在Jekyll的两个日期之间获得差异.我怎样才能做到这一点?
{% capture currentDate %}{{ site.time | date: '%Y-%m-%d' }}{% endcapture %}
{{currentDate}}
{% capture event_date %}{{ entry.date }}{% endcapture %}
{% if event_date < currentDate %}Yes{% else %}No{% endif %}
Run Code Online (Sandbox Code Playgroud)
在条目中有我的YAML:
---
title: ChartLine C3
type: charts
description: Chart with round for prisma
id: c3-1
date: 2015-07-18
---
Run Code Online (Sandbox Code Playgroud) 我不是CSS的专家,为了达到我的div的以下形状,我会挣扎:
然后我想在中心插入文字.
我怎样才能获得这种形状?
在这下面,我的一些尝试:
<div class="triangle-down-white" style="height:400px;">
try
</div>
Run Code Online (Sandbox Code Playgroud)
和css
.triangle-down-white {
width: 100%;
height: 0;
padding-left:50%;
padding-top: 4%;
overflow: hidden;
background: rgba(140, 140, 140, 0.33);
}
.triangle-down-white:before,
.triangle-down-white:after {
content: "";
display: block;
height: 122px;
width: 122px;
margin-left:-1000px;
border-left: 1000px solid transparent;
border-right: 1000px solid transparent;
border-top: 100px solid rgba(140, 140, 140, 0.33);
}
.triangle-down-white:before
{ /* hide arrow tails background */
border-top: 100px solid white;
}
Run Code Online (Sandbox Code Playgroud)
更新 我添加了新风格的雪佛龙,但文字出现在div后面.我正在使用bootstrap,html代码如下:
<div class="row">
<div class="col-sm-12" id="chevron">
<p>asdasdasdasasdaasdsadasadsadsasd</p>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
其余的代码完全是bootstrap的标准代码.
解决了 …