我正在尝试在我的电子邮件模板中创建彩色列部分.我遇到的问题是包含所有电子邮件内容的内容包装器是根据下面的代码设置的.同样,包括浮动列CSS.
#content {
background-color: white;
margin: auto;
width: 600px;
color: #888;
font-size: 12px;
border-radius: .6em .6em 0em 0em;
box-shadow: 0px 0px 15px 0px #555;
}
.blueLeft {
background-color: #33ccff;
float: left;
display: block;
width: 300px;
padding: 20px;
font-size: 16px;
}
.blueRight {
background-color: #33ccff;
float: right;
display: block;
width: 300px;
padding: 20px;
font-size: 16px;
}
<div id="content">
<div class="blueLeft">
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut …Run Code Online (Sandbox Code Playgroud) 在我的程序中,我有一个while循环,它将显示商店列表并要求输入,这与商店ID相对应.如果用户在使用Shop类创建的商店数组之外输入一个整数,它将退出循环并继续.在这个循环中是另一个while循环,它调用sellItem我的Shop类的方法如下:
public Item sellItem()
{
displayItems();
int indexID = Shop.getInput();
if (indexID <= -1 || indexID >= wares.length)
{
System.out.println("Null"); // Testing purposes
return null;
}
else
{
return wares[indexID];
}
}
private void displayItems()
{
System.out.println("Name\t\t\t\tWeight\t\t\t\tPrice");
System.out.println("0. Return to Shops");
for(int i = 0; i < wares.length; i++)
{
System.out.print(i + 1 + ". ");
System.out.println(wares[i].getName() + "\t\t\t\t" + wares[i].getWeight() + "\t\t\t\t" + wares[i].getPrice());
}
}
private static int …Run Code Online (Sandbox Code Playgroud) 我想知道是否有可能追踪1px方形轮廓,插入div内的特定距离.目前,css和HTML看起来像这样
.object {
width: 100px;
height: 100px;
background-color: red;
color: white;
padding: 5px;
}Run Code Online (Sandbox Code Playgroud)
<div class="object">
Hello World!
</div>Run Code Online (Sandbox Code Playgroud)
结果如下:
http://i.imgur.com/qdB0yb6.png
而预期的结果将是这样的: