使用移动主题控制XPages CSS的顺序 [英] Controlling order of XPages CSS using mobile theme

查看:69
本文介绍了使用移动主题控制XPages CSS的顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用XPages Mobile主题时,我添加到页面上的CSS文件是作为资源添加到IBM之前作为移动主题一部分提供的CSS文件之前添加的.

When using the XPages Mobile theme the CSS files I add to the page as resources are added before the CSS files provided by IBM as part of the mobile theme.

示例:

<xp:this.resources>
  <xp:styleSheet href="css/font-awesome/css/font-awesome.css"></xp:styleSheet>
  <xp:styleSheet href="/mobile.css"></xp:styleSheet>
</xp:this.resources>

生成以下HTML

<link rel="stylesheet" type="text/css" href="/redpill/graph.nsf/css/font-awesome/css/font-awesome.css">
<link rel="stylesheet" type="text/css" href="/redpill/graph.nsf/mobile.css">
<link rel="stylesheet" type="text/css" href="/xsp/.ibmxspres/dojoroot-1.8.1/dojox/mobile/themes/iphone/iphone.css">
<link rel="stylesheet" type="text/css" href="/xsp/.ibmxspres/.extlib/css/customMobile.css">
<link rel="stylesheet" type="text/css" href="/xsp/.ibmxspres/.extlib/css/customIphone.css">  

是否有一种方法可以强制在IBM之后添加我自己的自定义控件?当我自己的CSS列在链中的第一位时,控制样式更具挑战性(但并非并非不可能).

Is there a way to force my own custom controls to be added after IBM's? It is more challenging (but not impossible) to control the style when my own CSS is listed first in the chain.

推荐答案

我找到了解决方案.我不确定它是否符合W3规范,但是我可以通过将链接作为XML代码放在XPage内的方式简单地在正文中添加链接.

I found a solution. I am not sure it complies with the W3 spec but I can simply add the link in the Body by placing it as XML code inside the XPage.

<link rel="stylesheet" type="text/css" href="/redpill/graph.nsf/mobile.css"></link>

这篇关于使用移动主题控制XPages CSS的顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆