简体   繁体   English

如何删除徽标图像?

[英]How to remove logo image?

I'm trying to remove a logo image from the bottom of my page. 我正在尝试从页面底部删除徽标图像。 The logo is generated by the following function: 徽标由以下功能生成:

function addLogoContentBlock($content, $styles) {
if(empty($content['blocks'])) return $content;
$content['blocks'][] = array(
  'type' => 'container',
  'orientation' => 'horizontal',
  'styles' => array(
    'block' => array(
      'backgroundColor' => (!empty($styles['body']['backgroundColor'])) ?
        $styles['body']['backgroundColor'] :
        'transparent'
    )
  ),
  'blocks' => array(
    array(
      'type' => 'container',
      'orientation' => 'vertical',
      'styles' => array(
      ),
      'blocks' => array(
        array(
          'type' => 'image',
          'link' => 'http://www.example.com',
          'src' => Env::$assets_url . '/img/logo.png',
          'fullWidth' => false,
          'alt' => 'logo',
          'width' => '108px',
          'height' => '65px',
          'styles' => array(
            'block' => array(
              'textAlign' => 'center'
            )
          )
        )
      )
    )
  )
);
return $content;
}

How can I remove the logo? 如何删除徽标? I tried setting $content['blocks'] to null but that didn't work. 我尝试将$content['blocks']为null,但这没有用。

You could remove this line 您可以删除此行

          'src' => Env::$assets_url . '/img/logo.png',

from your code. 从您的代码。

you can use css to hide this image 您可以使用CSS隐藏此图片

img[alt='logo']{
display: none;
}

you can capture it by alt attribute 您可以通过alt属性捕获它

 array(
          'type' => 'image',
          'link' => 'http://www.example.com',
          'src' => Env::$assets_url . '/img/logo.png',
          'fullWidth' => false,
          'alt' => 'logo',
          'width' => '108px',
          'height' => '65px',
          'styles' => array(
            'block' => array(
              'textAlign' => 'center',
              'display' => 'none'           // add this string
            )
          )
        )

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如果徽标在主页上而不在标题中,如何允许自定义徽标图像上传? - How to allow custom logo image upload if logo is on home page, not in header? 如何在QRCode图像中添加透明徽标 - How to add transparent logo in QRCode image 如何在GIF图像中添加Watemark徽标? - How to add Watemark logo in a GIF image? 如何在php中将徽标(徽标是.png格式的图像)嵌入到另一个图像(.svg格式的图像)中 - How to embed a logo ( logo is image in .png format ) into another image ( image in .svg format) in php 如何添加logo图像,链接到wordpress admin sidebar? - How to add logo image, link to wordpress admin sidebar? 如何在Wordpress中提取不包括标题和徽标图像的帖子和页面图像? - How to extract images of post and pages excluding header and logo image in wordpress? 如何获得嵌入徽标的Twitter和Facebook的方形个人资料图像? - How to get Square Size Profile Image of Twitter and Facebook with Logo Embedded? 如何在wordpress主题(mystile)标头上添加图像和徽标(psd)? - How to add image and logo (psd) on wordpress theme (mystile) header? 如何在Codeigniter中将横幅徽标图像链接到home.php - how to link banner logo image to home.php in codeigniter 在Wordpress中将文字徽标更改为图像徽标 - Changing text logo to image logo in Wordpress
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM