Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 镀铬透明主题色_Css_Html_Google Chrome - Fatal编程技术网

Css 镀铬透明主题色

Css 镀铬透明主题色,css,html,google-chrome,Css,Html,Google Chrome,有没有可能在chrome中使用半透明的主题颜色 <meta name="theme-color" content="rgba(0,0,0,0.5)"> 这会产生一种完全黑色。有没有办法让它发挥作用?您可以在活动的styles.xml中使用它: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.Transparent" parent="android:The

有没有可能在chrome中使用半透明的主题颜色

<meta name="theme-color" content="rgba(0,0,0,0.5)">


这会产生一种完全黑色。有没有办法让它发挥作用?

您可以在活动的styles.xml中使用它:

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <style name="Theme.Transparent" parent="android:Theme">
    <item name="android:windowIsTranslucent">true</item>
    <item name="android:windowBackground">@android:color/transparent</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowIsFloating">true</item>
    <item name="android:backgroundDimEnabled">false</item>
  </style>
</resources>

真的
@android:彩色/透明
@空的
真的
真的
假的
将上述主题应用于清单文件中的活动:

<activity android:name=".ActivityName" android:theme="@style/Theme.Transparent">
..
</activity>

..

完成了。

不知道它是否有效,但是十六进制颜色代码呢?例如,使用#80FFFFF,可以得到半透明的白色。如果更改开头的值,透明度将更改,例如:#20FFFFFF,其透明度更高要在何处应用此主题?Android还是HTML?如果Android在哪里呢?在一个运行的网站上chrome@amann那你为什么要添加安卓标签呢?我认为安卓标签是有效的,因为它是安卓特有的问题。除了android之外,任何版本的chrome都没有主题颜色。对不起,我指的是chrome中的网站。@Morteza可能是因为他指的是android中chrome中的网站。