2015-11-05 47 views
0

我正在學習yii2,並且想知道如何將以下內容轉換爲yii2,並且仍然能夠響應我在手機,平板電腦或PC中查看的內容。你會如何將以下內容轉換爲yii2

這是下面的代碼。

<div class="col-sm-4 col-xs-6 col-land-4 "><p class="text-center"> 
<a href="consearch.php"> 
<img class="img-responsive center-block" src="images/conbuttscreen.png" 
    alt="Find Concierge Services" /> 
<strong>CONCIERGE<br/>SERVICES</strong><br/></a></p></div> 

我想看看如何使用HTML 其轉換爲yii2編碼例如:: A()HTML ::提交按鈕()在警予\助手發現標籤\ HTML

+0

這是與HTML和CSS。不是我害怕 –

+0

我正在考慮像'<?= Html :: a(Html :: img('@ web/images/docbuttscreen.png',['alt'=>'查找醫生/健康專業人員' ,'class'=>'img-responsive center-block']), ['/ site/docsearch']);' – samauto

+0

可以ü編輯您的問題,以便它非常清楚 –

回答

1

爲錨,你可以做這樣

<div class="col-sm-4 col-xs-6 col-land-4 "><p class="text-center"> 
<?= Html::a('<img class="img-responsive center-block" src="@web/images/conbuttscreen.png" 
       alt="Find Concierge Services" /><strong>CONCIERGE<br/>SERVICES</strong><br/>', ['consearch.php']) ?> 
</p></div>