透明导航代码,求淘宝店铺导航条代码,半透明状态的。如下图
本文目录索引
- 1,求淘宝店铺导航条代码,半透明状态的。如下图
- 2,淘宝新版旺铺导航半透明CSS代码是什么
- 3,求淘宝导航透明背景代码
- 4,如何实现Android透明导航栏
- 5,如何实现Android沉浸式状态栏
- 6,如何实现Android透明导航栏
- 7,如何实现Android透明导航栏
- 8,如何实现Android透明导航栏
- 9,如何实现Android透明导航栏
1,求淘宝店铺导航条代码,半透明状态的。如下图
代码如下,放入导航栏的“显示设置”中。
.skin-box-bd{background:transparent;}.skin-box-bd .menu-list{background:transparent;}.skin-box-bd .menu-list .menu{background:transparent;border:none;}.skin-box-bd .menu-list .menu .link{background:transparent;border:none;}.all-cats{background:transparent;}.all-cats .link{background:transparent;border:none;}.skin-box-bd .menu-list .menu .link .title{color:#000000;}.all-cats .link .title{color:#000000;}.all-cats .link .popup-icon{background:transparent;}
粘贴复制来的。。。。。。。。。。。。。。。。。。
2,淘宝新版旺铺导航半透明CSS代码是什么
1:登陆淘宝卖家中心,进入淘宝店铺装修后台页面,鼠标放在导航栏位置,出现编辑窗口,
2:点击编辑,找到“显示设置”,点击后看到白框就是CSS自定义框。
3:将我们上面提供的透明代码复制进去,导航栏就会透明显示了
简单的淘宝新旺铺自定义CSS导航透明背景代码:
.skin-box-bd{background:none;}
.menu-list{background:none;}.link{background:none;}
.menu{background:none;}
.all-cats{background:none;}
.all-cats{display:none;}
.menu-list .menu .title{color:#CF6AA6;}
完全的淘宝新旺铺自定义CSS导航透明背景代码:
.skin-box-bd{background:none;border:none;}
.menu-list{background:none;}
.link{background:none;border:none;}
.menu{background:none;}
.all-cats{background:none;}
.skin-box-bd .all-cats .link{border:none;}
.skin-box-bd .menu-list .menu{border:none;}
.menu-list .menu .title{color:#000000;font-size:15px;font-weight:bold;}
.all-cats .link .title{color:#000000;font-size:15px;font-weight:bold;}
.skin-box-bd .menu-list .menu-selected .link{background:none;}
.skin-box-bd .menu-list .menu-selected .link .title{background:none;}
3,求淘宝导航透明背景代码
代码如下,放入导航栏的“显示设置”中。 .skin-box-bd{background:transparent;}.skin-box-bd .menu-list{background:transparent;}.skin-box-bd .menu-list .menu{background:transparent;border:none;}.skin-box-bd .menu-list .menu .link{background:transparent;border:none;}.all-cats{background:transparent;}.all-cats .link{background:transparent;border:none;}.skin-box-bd .menu-list .menu .link .title{color:#000000;}.all-cats .link .title{color:#000000;}.all-cats .link .popup-icon{background:transparent;} 我百度空间中有代码生成工具,其中有一项就是关于导航栏CSS代码的,可以自助生成代码,你可以去看看。
4,如何实现Android透明导航栏
在我的 UINavigationController 的子类,我使导航栏半透明: - (id)initWithRootViewController:(UIViewController *)rootViewController { if (self = [super initWithRootViewController:rootViewController]) { self.navigationBar.translucent = YES; } return self; } 色调颜色 在我的 UIApplicationDelegate 的子类,我设置导航栏中的色调颜色。我发现色调颜色的 alpha 没有区别。也就是说,使用 alpha 0.1 不会导致要变得更透亮的栏。 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[UINavigationBar appearance] setTintColor:[UIColor greenColor]]; } 边缘 在我的内容视图控制器中,我将设置边缘为 UIRectEdgeNone 这样顶部的导航栏不会砍。如果要使用默认的 UIRectEdgeAll ,导航栏将会永久地盖顶部的我的内容。即使我要住在一起这种异常, UIRectEdgeAll 仍然不会启用半透明效果。 - (void) viewDidLoad { [super viewDidLoad]; self.edgesForExtendedLayout = UIRectEdgeNone; } 编辑: 试验与边缘 @rmaddy 在中所指出的广告问题可能与 edgesForExtendedLayout。我发现综合教程 edgesForExtendedLayout ,并试图实现它: - (void) viewDidLoad { [super viewDidLoad]; self.edgesForExtendedLayout = UIRectEdgeAll; self.automaticallyAdjustsScrollViewInsets = YES; self.extendedLayoutIncludesOpaqueBars = NO; } 它不工作。首先,那里是没有半透明效果。第二,我的内容的顶部被切掉。在上面的代码与以下示例页上,神通最初由导航栏和它是很难向滚动。你可以拉下,看到顶部的化身,但当你放开,页面会自动弹起来,神通将会再次被遮掩。 解决方法 1: 问题是由第三方拉下来刷新视图EGORefreshTableHeaderView,而普遍地使用了之前的 iOS 6 介绍系统刷新控制引起的。 这种观点混淆了 iOS 7,让它认为内容是比真的很高。Ios 6 和 7,我已经有条件地切换到使用UIRefreshControl。现在的导航栏不会砍掉我的内容。我可以使用 UIRectEdgeAll ,使我下面的导航栏的内容走。最后,显示我的导航栏与较低的 α 要获得半透明效果色调图。 // mostly redundant calls, because they're all default self.edgesForExtendedLayout = UIRectEdgeAll; self.automaticallyAdjustsScrollViewInsets = YES; self.extendedLayoutIncludesOpaqueBars = NO; [[UINavigationBar appearance] setTintColor:[UIColor colorWithWhite:0.0 alpha:0.5]];
5,如何实现Android沉浸式状态栏
方法一:系统的方式沉浸式状态栏实现
1、//当系统版本为4.4或者4.4以上时可以使用沉浸式状态栏
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
//透明状态栏
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
//透明导航栏
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
2、布局加入:
android:fitsSystemWindows="true"
android:clipToPadding="true"
方法二:实现思路,添加隐藏布局,然后我们动态的计算状态栏的高度,然后把这个高度设置成这个隐藏的布局的高度,便可以实现
/**
* 通过反射的方式获取状态栏高度
*
* @return
*/
private int getStatusBarHeight() {
try {
Class c = Class.forName("com.android.internal.R$dimen");
Object obj = c.newInstance();
Field field = c.getField("status_bar_height");
int x = Integer.parseInt(field.get(obj).toString());
return getResources().getDimensionPixelSize(x);
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
方法三、用的github上的第三方库
1.库地址:github.com/jgilfelt/SystemBarTint
2.添加依赖库:
compile ‘com.readystatesoftware.systembartint:systembartint:1.0.3’
3、 android:fitsSystemWindows="true"
android:clipToPadding="true
4、 SystemBarTintManager tintManager = new SystemBarTintManager(this);
// 激活状态栏
tintManager.setStatusBarTintEnabled(true);
// enable navigation bar tint 激活导航栏
tintManager.setNavigationBarTintEnabled(true);
//设置系统栏设置颜色
//tintManager.setTintColor(R.color.red);
//给状态栏设置颜色
tintManager.setStatusBarTintResource(R.color.mask_tags_1);
//Apply the specified drawable or color resource to the system navigation bar.
//给导航栏设置资源
tintManager.setNavigationBarTintResource(R.color.mask_tags_1);
6,如何实现Android透明导航栏
android kitkat 有一个新的特性可以设置手机状态栏的背景,让手机整个界面的风格保持一致,看起来非常清爽。
android 4.4 提供了一套能透明的系统ui样式给状态栏和导航栏,这样的话就不用向以前那样每天面对着黑乎乎的上下两条黑栏了,还可以调成跟activity 一样的样式,形成一个完整的主题。
首先要打开activity的透明主题功能,可以把activity的主题设置继承*.TranslucentDecor 主题,然后设置android:windowTranslucentNavigation 或者android:windowTranslucentStatus的主题属性为true,又或者在activity的代码里面开启FLAG_TRANSLUCENT_NAVIGATION 或是 FLAG_TRANSLUCENT_STATUS的window窗口标识。由于透明主题不能在4.4以前的版本里面使用,所以系统样式跟以前没有区别,也就是看不到任何变化,这是一个兼容模式,这个模式可以兼容到api 10。
7,如何实现Android透明导航栏
实现功能 1.步骤: 1) 创建一个工程,主布局就先做一个ImageView,自己找个好看的图片做src。 2) 在Activity重写的onCreate方法中获得窗口视图对象(DecorView) 3) 设置DecorView的SystemUiVisibility 4) 设置导航条、状态栏的颜色–>透明 5) 获取当前Activity的ActionBar并隐藏 2.具体代码和注释: 获取DecorView对象 @Overrideprotected void onCreate(Bundle savedInstanceState) { ... View decorView = getWindow().getDecorView(); ...}设置SystemUiVisibility int option = View.SYSTEM_UI_FLAG_FULLSCREEN // 全屏标记 | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN // 布局全屏标记,避免退出全屏模式时内容被覆盖 | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // 隐藏导航栏标记 | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION // 布局隐藏导航栏标记,同理 | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY // 粘性沉浸体验 | View.SYSTEM_UI_FLAG_LAYOUT_STABLE; // 确保上述标记稳定// 此方法用来设置系统UI的可见性,系统UI包括状态栏、ActionBar、导航栏devorView.setSystemUiVisibility(option);设置状态栏、导航栏的颜色: getWindow().setStatusBarColor(Color.TRANSPARENT);// Color.TRANSPARENT = 0 表示#00000000即透明颜色getWindow().setNavigationBarColor(Color.TRANSPARENT);获取本页面的ActionBar并隐藏起来 ActionBar actionBar = getSupportActionBar(); // 注意:此处用的Activity继承的是AppCompatActivity(它继承的是FragmentActivity)// 所以调用的是getSupport...方法,如果继承Activity则直接调用get...方法assert actionBar != null; // 这一句可以不理会,反正我是Ctrl + F1提示出来的,意思其实是判断如果actionBar不为空则向下执行。actionBar.hide();注意:最后一点注意事项是:只支持Android API 21以上的手机
8,如何实现Android透明导航栏
Google 在 4.4 给全屏阅读文字或玩游戏这种情景增加了透明状态栏和透明导航栏的功能
方法1:设置 Acitivity 所在 window 的属性
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
}
setContentView(R.layout.activity_main);
}
如果 Activity 有 actionbar,那么还需要在 Activity 的布局文件的根节点上设置两个属性
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="true"
android:fitsSystemWindows="true"
android:orientation="vertical"
tools:context="com.example.statusbar.MainActivity" >
方法2:设置 theme 属性
android:theme="@android:style/Theme.DeviceDefault.Light.NoActionBar.TranslucentDecor"
android:theme="@android:style/Theme.Holo.Light.NoActionBar.TranslucentDecor"
android:theme="@android:style/Theme.Holo.NoActionBar.TranslucentDecor"
如果使用自定主题,只需在在 values-19 文件夹下添加以下属性
true
true
9,如何实现Android透明导航栏
Android 4.4 实现透明状态栏和导航栏 Translucent system bar
In the layout containing your list, add two attributes to your ListView:
<ListView
android:fitsSystemWindows=”true”
android:clipToPadding=”false” />
The fitsSystemWindows attribute makes your ListView fit to the edges of the action bar and navigation bar (instead of going under them), and clipToPadding
makes items of your ListViews and ScrollViews scroll under the
navigation bar (and allows the last item in the list scroll all the way
up until it just passes the navigation bar). These attributes can also
be added to your actual theme (in /values-v19/styles.xml), but that may
not be right for all cases.
Update
Recylerview 是放在 ViewPager 中的,ViewPager 又是放在 CoordinatorLayout 中的,然后把上述两个属性加到 CoordinatorLayout 中,实现透明导航栏。而加在ViewPager中却不可以。看来还是针对父视图才有效。(当然还得把问题中的配置加到 styles-v21.xml中)
layout/include_list_viewpager.xml
<android.support.design.widget.CoordinatorLayout
android:id="@+id/main_content"
android:fitsSystemWindows="true"
android:clipToPadding="true" >
<android.support.v4.view.ViewPager
android:id="@+id/viewpager" />