简体   繁体   English

Sencha Touch 2 CSS无法正常工作

[英]Sencha Touch 2 CSS not working

When creating a new CSS theme and after compiling the theme with compass, there was no change on the styles. 创建新的CSS主题并使用指南针编译主题后,样式没有变化。 Everything was looking just like before, with the default theme. 使用默认主题,一切看起来都像以前一样。 How to solve this ? 如何解决呢?

Make sure you move the link to your CSS file below the line: 确保将链接移动到以下行的CSS文件中:

<script id="microloader" type="text/javascript" src="sdk/microloader/development.js"></script>

I put it right at the end of the <head></head> element. 我把它放在<head></head>元素的末尾。

(...)
<script id="microloader" type="text/javascript" src="sdk/microloader/development.js"></script>
<link rel="stylesheet" href="default-theme.css" type="text/css" media="screen" title="no title" charset="utf-8">
</head>
(...)

Just place all your variables below the default @import statements like this: 只需将所有变量放置在默认的@import语句下方,如下所示:

@import 'sencha-touch/default';
@import 'sencha-touch/default/all';

$base-color: #27ae60;
$base-gradient: 'matte';
$alert-color: #2ecc71;
$confirm-color: #e67e22;
$page-bg-color: #3498db;
$form-bg-color: #ecf0f1;
$button-radius: '0px';

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

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