Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/301.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
Python 如何在谷歌应用程序引擎中使用twitter引导图标?_Python_Google App Engine_Twitter Bootstrap - Fatal编程技术网

Python 如何在谷歌应用程序引擎中使用twitter引导图标?

Python 如何在谷歌应用程序引擎中使用twitter引导图标?,python,google-app-engine,twitter-bootstrap,Python,Google App Engine,Twitter Bootstrap,要使用Twitter引导图标,我应该怎么做?您所要做的就是正确地指出引导附带的两个精灵图像的位置 如果使用LESS,请在变量中找到这些行。LESS: - url: /static/images/(.*\.(gif|ico|jpeg|jpg|png)) static_files: static/images/\1 upload: static/images/(.*\.(gif|ico|jpeg|jpg|png)) 并将其更改为如下内容: @iconSpritePath:

要使用Twitter引导图标,我应该怎么做?

您所要做的就是正确地指出引导附带的两个精灵图像的位置

如果使用LESS,请在
变量中找到这些行。LESS

- url: /static/images/(.*\.(gif|ico|jpeg|jpg|png))
  static_files: static/images/\1
  upload: static/images/(.*\.(gif|ico|jpeg|jpg|png))
并将其更改为如下内容:

@iconSpritePath:          "../img/glyphicons-halflings.png";
@iconWhiteSpritePath:     "../img/glyphicons-halflings-white.png";
如果这些图像位于
静态/images
目录中

否则,如果您使用的是CSS版本的引导,则只需找到对这些图像的引用,并放置正确的路径:

@iconSpritePath:          "/static/images/glyphicons-halflings.png";
@iconWhiteSpritePath:     "/static/images/glyphicons-halflings-white.png";

您所要做的就是正确地指出引导程序附带的两个精灵图像的位置

如果使用LESS,请在
变量中找到这些行。LESS

- url: /static/images/(.*\.(gif|ico|jpeg|jpg|png))
  static_files: static/images/\1
  upload: static/images/(.*\.(gif|ico|jpeg|jpg|png))
并将其更改为如下内容:

@iconSpritePath:          "../img/glyphicons-halflings.png";
@iconWhiteSpritePath:     "../img/glyphicons-halflings-white.png";
如果这些图像位于
静态/images
目录中

否则,如果您使用的是CSS版本的引导,则只需找到对这些图像的引用,并放置正确的路径:

@iconSpritePath:          "/static/images/glyphicons-halflings.png";
@iconWhiteSpritePath:     "/static/images/glyphicons-halflings-white.png";

你的css看起来还好吧?这就是我正在使用的有效方法

background-image: url("../img/glyphicons-halflings.png"); 
...
background-image: url("../img/glyphicons-halflings-white.png");
那么这应该是可行的等等

- url: /img/(.*\.(gif|png|jpg))
  static_files: static/img/\1
  upload: static/img/(.*\.(gif|png|jpg))

- url: /css
  static_dir: static/css

- url: /js
  mime_type: text/javascript
  static_dir: static/js

您的css看起来正常吗?这就是我正在使用的有效方法

background-image: url("../img/glyphicons-halflings.png"); 
...
background-image: url("../img/glyphicons-halflings-white.png");
那么这应该是可行的等等

- url: /img/(.*\.(gif|png|jpg))
  static_files: static/img/\1
  upload: static/img/(.*\.(gif|png|jpg))

- url: /css
  static_dir: static/css

- url: /js
  mime_type: text/javascript
  static_dir: static/js

我需要再添加一个步骤,让Lipis的答案对我有用

我的bootstrap.css文件中的第2285行最初读作如下,但图标仍然没有显示

<i class="icon-search icon-white"></i>
然后我将这个相对路径更改为绝对路径,如下所示,图标立即出现

background-image: url("../img/glyphicons-halflings.png");
至于为什么相对路径没有正确解析,这是明天的事情。同时,至少绝对路径解决方案对我有效(也许对其他人也有效)


非常感谢Lipis为您提供上述解决方案。

我需要再添加一个步骤,使Lipis的答案对我有用

我的bootstrap.css文件中的第2285行最初读作如下,但图标仍然没有显示

<i class="icon-search icon-white"></i>
然后我将这个相对路径更改为绝对路径,如下所示,图标立即出现

background-image: url("../img/glyphicons-halflings.png");
至于为什么相对路径没有正确解析,这是明天的事情。同时,至少绝对路径解决方案对我有效(也许对其他人也有效)


非常感谢Lipis为您提供上述解决方案。

这个话题很老了,但可能有人在寻找类似问题的答案。就我而言,补充一点就足够了

background-image: url("http://www.mywebsite.com/img/glyphicons-halflings.png");

在app.yaml中,保持bootstrap.css不变。Glyphicons自然应该位于根目录的fonts文件夹中。

这个主题很老了,但可能有人正在寻找类似问题的答案。就我而言,补充一点就足够了

background-image: url("http://www.mywebsite.com/img/glyphicons-halflings.png");

在app.yaml中,保持bootstrap.css不变。Glyphicons自然应该位于根目录的fonts文件夹中。

我应该将@IConScreetPath放在哪里?我用的是整包。我应该将图像移动到static/image文件夹吗?现在,它们在bootstrap/img文件夹中。@tipsywacky我更新了我的答案。。我猜您正在使用css版本,所以请在bootstrap.css文件中找到这些行并对其进行更改。我应该将@IConScreetPath放在哪里?我用的是整包。我应该将图像移动到static/image文件夹吗?现在,它们在bootstrap/img文件夹中。@tipsywacky我更新了我的答案。。我猜您正在使用css版本,所以请在bootstrap.css文件中找到这些行并对其进行更改。您不需要更改URL映射,只需使图标正常工作即可。更多信息,请阅读我的答案。您不需要更改URL映射,只需使图标正常工作即可。阅读我的答案了解更多。。