如何在php中并排添加两个图像?

时间:2016-01-21 17:39:37

标签: php html css

这是我的代码: 我想将树图像侧面添加到侧边宽度300px高度300px,当您点击iomage时,它会将它们重定向到新页面。

<!DOCTYPE html>

<Title> Services </Title>
    <link rel="stylesheet" href="css/style.css" />
</Head>
<body>
<div>
<h2> <div style=text-align:center;"> <img src="images/banner-services.jpg" alt="banner-services" /> </h2>
<h2 style=text-align:center;> <b> Select The Type of Dance You Would Like to Buy </b> </h2>
<br>
<a href="bachata.php">
    <div style="width:300px;height:300px;background-image:url('images/bachata-logooo.jpg');">
    <div style=text-align:center;"> Bachata
    </div>

    <a href="salsa.php">
    <div style="width:300px;height:300px;background-image:url('images/salsa-logooo.jpg');">
    <div style=text-align:center;"> salsa-logooo
    </div>

    a href="merengue.php">
    <div style="width:300px;height:300px;background-image:url('images/merengue-logooo.jpg');">
    <div style=text-align:center;"> merengue-logooo
    </div>

1 个答案:

答案 0 :(得分:0)

style="display:inline-block;"提供给<a>代码。请注意,这不会响应,除非分辨率高于(至少)900px,否则这些块将溢出到另一条线上。