简体   繁体   English

在iOS主题Framework7 v2.0.10中将CSS用于特定页面的目标导航栏

[英]Target navbar using css for specific page in iOS theme Framework7 v2.0.10

I am using latest version for Framewrok7 ie v2.0.10 I have design that is tranparent navbar for inner pages in my app. 我正在为Framewrok7使用最新版本,即v2.0.10,我的应用程序设计为内部页面的透明导航栏。

I have used “data-name” or added custom in page class for MD themes for adding custom css on Navbar. 我使用“数据名称”或在MD主题的页面类中添加了自定义,以便在Navbar上添加自定义CSS。 but for iOS theme there is common navbar and there is no any page specific class on above it. 但是对于iOS主题,有一个通用的导航栏,上面没有任何页面特定的类。

I wants to remove the background, remove the harilines for few pages in iOS theme. 我想删除背景,删除iOS主题中几页的边框。 also, no-hairline not working for iOS theme. 此外,没有限制线不适用于iOS主题。

How can i target iOS theme navbar for specific inner pages? 如何针对特定内页定位iOS主题导航栏? How can i add data-name attribute in “view” like previous version of Framework7 did. 我如何像以前版本的Framework7在“视图”中添加data-name属性。

在此处输入图片说明

You can use page events to assign required class or page name to the view/navbar, eg: 您可以使用页面事件将所需的类或页面名称分配给视图/导航栏,例如:

$(document).on('page:beforein', function (e) {
    var page = e.detail;
    $('.view-main').attr('data-name', page.name);
});

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

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