简体   繁体   English

使文本背景透明

[英]Make text background transparent

My problem is I have created a website using an online website creator for free. 我的问题是我使用在线网站创建者免费创建了一个网站 The only way to edit my website is through the builder. 编辑我的网站的唯一方法是通过构建器。 They have provided me a <head> tag where I can copy paste code to change. 他们为我提供了一个<head>标记,可以在其中复制粘贴代码以进行更改。

In my web page I want to make my text background transparent. 在我的网页中,我想使文本背景透明。 Ie make background same as my website background. 即使背景与我的网站背景相同。 Thank you for help. 谢谢你的帮助。

Inside your head tag, find a style tag and add this on a new line. 在您的head标签内,找到一个style标签并将其添加到新行中。

#content {background-color:transparent}

If you can't find a style tag, create one: 如果找不到样式标签,请创建一个:

<style>
  #content {background-color:transparent}
</style>

I think its better if you use 'rgba' color mode. 我认为如果您使用“ rgba”颜色模式会更好。 r red g geen b blue a alpha (opacity) r红色geen b蓝色a alpha(不透明度)

You can find rgb values of any color in adobe Photoshop or any other image editors in market. 您可以在Adobe Photoshop或市场上任何其他图像编辑器中找到任何颜色的rgb值。

Photoshop中的rgb值 in the given image the color is"#d10f0f" 在给定的图像中,颜色为“#d10f0f”

You can write it in css 您可以在CSS中编写它

background-color:#d10f0f;

aslo in rgba RGBA的ASLO

background-color:rgba(209,15,15,0.5);

and here you can change the transparency of the color by adjusting the last value "0.5" you can choose any value between 0.1 to 1. 在这里您可以通过调整最后一个值“ 0.5”来更改颜色的透明度,您可以选择0.1到1之间的任何值。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM