根据此链接预取,预取仅适用于特定浏览器.不幸的是,我需要它主要在移动设备上工作.
任何人都有一个解决方案如何预加载,预取,缓存页面,以便它适用于iOS?(苹果浏览器)
所以我需要创建一个 LIKE 按钮。但我不能让我的文本和图像按中间中心对齐。+这个 % 的响应性让我发疯。
也许我做的事情太难了,有人可以更轻松地重写并向我解释。但我希望按钮以 % 的响应进行缩放。
.kom_augsha .treshais{
width:15%;
float:right;
}
.reitings{
display:table;
width: 100%;
border: 1px solid #e9e9e9;
}
.rate {
display: table-cell;
text-align: center;
vertical-align:middle;
line-height: 1.5em;
}
.plus {
background: white;
color: green;
}
.minus{
background: white;
color: red;
border-left: 1px solid #e9e9e9;
padding-left:10px;
text-align:center;
}Run Code Online (Sandbox Code Playgroud)
<div class="treshais">
<div class="reitings">
<div class="rate plus"><img src="plus.jpg"/>83</div>
<div class="rate minus"><img src="minus.jpg"/>9</div>
</div>
</div>Run Code Online (Sandbox Code Playgroud)
所以我有这三个按钮点击.
private void btn_OpenNotePad_Click(object sender, EventArgs e)
{
this.Hide();
Form2 forma_NotePad = new Form2();
forma_NotePad.ShowDialog();
this.Close();
}
private void btn_OpenPaint_Click(object sender, EventArgs e)
{
this.Hide();
Form3 forma_Paint = new Form3();
forma_Paint.ShowDialog();
this.Close();
}
private void btn_ContactAdmin_Click(object sender, EventArgs e)
{
this.Hide();
Form4 forma_ContactAdmin = new Form4();
forma_ContactAdmin.ShowDialog();
this.Close();
}
Run Code Online (Sandbox Code Playgroud)
它们都非常相似,所以我想到可以为它们创建一种方法吗?就像是:
private void OpenForm(parameter1, parameter2)
{
this.Hide();
parameter1 parameter2 = new parameter1();
parameter2.ShowDialog();
this.Close();
}
Run Code Online (Sandbox Code Playgroud)
所以我可以打电话给他们
OpenForm(parameter1,parameter2);
Run Code Online (Sandbox Code Playgroud)
并使我的代码更短,更清洁.
这就是我想要的.目前我只有一个里面有文字的矩形.不知道如何在它下面创建这个矩形.
码:
.txt_First {
font-size:0.8em;
text-align: justify;
padding-bottom:20px;
}
.com_box {
width:60px;
height: 50px;
background: black;
color:white;
float:left;
display: flex;
justify-content: center; /* align horizontal */
align-items: center; /* align vertical */
margin-right:8px;
margin-bottom: 5px;
margin-top:1px;
}
Run Code Online (Sandbox Code Playgroud)
HTML:
<div class="com_box">71</div>
<div class="txt_First">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to …Run Code Online (Sandbox Code Playgroud) 所以我试图学习Selenium并遇到问题.无法运行chromedriver.
错误:
Exception in thread "main" java.lang.IllegalStateException: The driver is not executable: /Users/Roberto/Documents/EclipseProjects/MansPirmaisSelenium/lib/chromedriver
Run Code Online (Sandbox Code Playgroud)
码:
System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir")+"//lib//chromedriver");
WebDriver chromeDriver = new ChromeDriver();
chromeDriver.get("http://www.google.lv");
Run Code Online (Sandbox Code Playgroud)
我不知道该怎样传递给我的方法来正确调用我的Circle绘图.这是我的代码:
private void Circle()
{
Graphics g1 = e.Graphics;
Pen p1 = new Pen(Color.Black);
g1.DrawEllipse(p1, 12, 12, 50, 50);
}
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
Circle();
}
Run Code Online (Sandbox Code Playgroud)
这不起作用,因为没有'e'.
如果我重写我的代码
Graphics g1 = e.Graphics;
Run Code Online (Sandbox Code Playgroud)
至
Graphics g1 = this.CreateGraphics();
Run Code Online (Sandbox Code Playgroud)
它会绘制圆圈但不会在图片框中绘制.我需要一个圆圈才能进入图片框.
如果我传递此代码,那么它的工作原理.
if (textBox1.Text == "1:1" && xOneOne == false && oOneOne == false)
{
oOneOne = true;
xOneOne = false;
pictureBox1.Refresh();
}
else
{
MessageBox.Show("Lauks ir aiznjemts xDDDD");
}
Run Code Online (Sandbox Code Playgroud)
但我想创建Method,所以我不需要一遍又一遍地复制相同的代码.该方法无效.我想它不会刷新图片框,因为我没有得到图像.
我的方法:
private void Aplis(TextBox textBox, string koordinatas, bool xVertiba, bool oVertiba, PictureBox PictureBox)
{
if (textBox.Text == koordinatas && xVertiba == false && oVertiba == false)
{
oVertiba = true;
xVertiba = false;
PictureBox.Refresh();
}
else
{
MessageBox.Show("Lauks ir aiznjemts xDDDD");
}
}
Run Code Online (Sandbox Code Playgroud)
我尝试这样称呼它而不是我的第一个代码:
Aplis(textBox1, "1:1", xOneOne, oOneOne, pictureBox1);
Run Code Online (Sandbox Code Playgroud)