2014-09-22 150 views
-1

我的三角形按钮和图像有问题。 在这里,您是代码>图像宽度问题CSS

[http://codepen.io/Luiggi/pen/elACq?editors=110][1] 

在这里,你是了解我的问题的图像。如何将按钮和图像放置在里面。 enter image description here

我希望有人能帮助我。非常感谢,

Luiggi

+0

你想将它定位在哪里? – 2014-09-22 12:00:23

+0

我认为你需要解释这个问题。您的图片并不真正帮助 – Turnip 2014-09-22 12:01:23

+0

您可以在CSS中设置图片高度'img {height:20px;}' – Sam1604 2014-09-22 12:05:47

回答

2

如果我听到你正确,你需要按钮像图像? 对于它你可以使用输入类型按钮和src属性。 水木清华这样的:

<input type="image" src="http://placekitten.com/g/300/150"> 

然后,你还要到位置(我认为绝对是更好的)他们容器包装你的形象。 您将有水木清华这样的:

<div class="wrapper"> 
    <img src="/i/image.jpg"> 
    <input type="image" src="/i/btn1.png" class="btn1"> 
    <input type="image" src="/i/btn1.png" class="btn2"> 
</div> 

和CSS:

.wrapper { position: relative; } 
.wrapper .btn1 { position: absolute; bottom: 0; left: 0;} 
.wrapper .btn2 { position: absolute; bottom: 0; right: 0;} 
+0

感谢您的帮助!!!! – Luiggi 2014-09-22 13:35:08