我只是希望列表项中的按钮,表单中的文本位于按钮顶部而不是中间谢谢。
HTML
<ul id="grid">
<li id="gridli">
<form action="http://google.com">
<button class="button" type="submit" />
Computers, printers, mobile phones and the widgets that accompany them account for the emission of about two per cent of the estimated total of emissions from human activity. And that is the same as the aviation industry’s contribution. 25 per cent of the emissions in question are generated by the manufacture of computers. The rest come from their use.
</button>
</form>
</li>
<li id="gridli">
<form action="http://google.com" style="float: left">
<button class="button" type="submit" />
Computers can be used to reduce emissions produced by other industries, up to 7.8 billion tonnes by 2020, or five times ICT’s own footprint. Computers can make industries more efficient and less wasteful of power and fuel.
</button>
</form>
</li>
<li id="gridli">
<form action="http://google.com" style="float: left">
<button class="button" type="submit" />
The use of computers has led to both positive and negative impacts on the climate change of our planet. Computers can help make some processes more efficient and save energy while the use and manufacture of computers contributes to the increased use of energy which leads to global warming. This website helps you to look at the positives and negatives of computing and climate change.</p>
</button>
</form>
</li>
<li id="gridli">
<form action="http://google.com" style="float: left">
<button class="button" type="submit" />
<h3> Saving Energy</h3>
There are many ways in which computers can help cut down on our use of energy. Computers are steadily improving the amount of energy that they use with the smaller computers producing less CO2 than larger desktop computers.
</button>
</form>
</li>
</ul>
CSS
.button {
background-color: white;
color: black;
border: 2px solid #555555;
text-decoration: none;
display: inline-block;
font-size: 16px;
-webkit-transition-duration: 0.4s;
/* Safari */
transition-duration: 0.4s;
cursor: pointer;
height: 30%;
vertical-align: top;
}
.button:hover {
background-color: #555555;
color: white;
}
#grid {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #ffffff;
display: flex;
flex: 1;
}
#gridli {
width: 24%;
margin-left: 0.5%;
margin-right: 0.5%;
}