Php 将CSS类属性添加到osCommerce tep_图像
可能重复:Php 将CSS类属性添加到osCommerce tep_图像,php,css,oscommerce,Php,Css,Oscommerce,可能重复: 我需要向osCommerce中的图像添加ID或类,以便使用媒体查询调整其大小 我尝试在这个语句中添加class=“classname”,但总是失败 在我的情况下,由于“bts_选择”,似乎不适合 tep_image(bts_select(images, 'logo' . (ITS_CHRISTMAS == 'true' ? '-xmas' : '') . '.gif'), STORE_NAME) . '</a>' tep_图像(bts_选择图像,'logo'。(它的'
我需要向osCommerce中的图像添加ID或类,以便使用媒体查询调整其大小 我尝试在这个语句中添加
class=“classname”
,但总是失败
在我的情况下,由于“bts_选择”,似乎不适合
tep_image(bts_select(images, 'logo' . (ITS_CHRISTMAS == 'true' ? '-xmas' : '') . '.gif'), STORE_NAME) . '</a>'
tep_图像(bts_选择图像,'logo'。(它的'u圣诞='true'?'-xmas':'')。.gif'),存储名称)。'
函数没有文档记录,但源代码相当简单:
function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
//[...]
if (tep_not_null($parameters)) $image .= ' ' . $parameters;
$image .= ' />';
return $image;
}
第五个参数在结束标记之前被注入。这就是你所需要的