小编use*_*r26的帖子

如何在网站上使用Google的Roboto字体?

我想在我的网站上使用Google的Roboto字体,我正在关注本教程:

http://www.maketecheasier.com/use-google-roboto-font-everywhere/2012/03/15

我已经下载了具有如下文件夹结构的文件:

在此输入图像描述

现在我有三个问题:

  1. 我的media/css/main.css网址中有css .那么我需要将该文件夹放在哪里?
  2. 我是否需要从所有子文件夹中提取所有eot,svg等并放入fonts文件夹?
  3. 我是否需要创建css文件fonts.css并包含在我的基本模板文件中?

他使用这个例子

@font-face {
    font-family: 'Roboto';
    src: url('Roboto-ThinItalic-webfont.eot');
    src: url('Roboto-ThinItalic-webfont.eot?#iefix') format('embedded-opentype'),
         url('Roboto-ThinItalic-webfont.woff') format('woff'),
         url('Roboto-ThinItalic-webfont.ttf') format('truetype'),
         url('Roboto-ThinItalic-webfont.svg#RobotoThinItalic') format('svg'); (under the Apache Software License). 
    font-weight: 200;
    font-style: italic;
}
Run Code Online (Sandbox Code Playgroud)

我的网址应该是什么样子,如果我想要像dir结构那样:

/media/fonts/roboto

html css fonts

139
推荐指数
6
解决办法
42万
查看次数

我可以在django模型字段中添加帮助文本吗?

我有一个学生详细信息页面,其中所有学生数据都以日志嵌套格式显示.

现在,我知道我可以添加帮助文本.但是现在我的经理希望当我们显示详细信息页面时,应该有助于将鼠标悬停在每个字段上.

现在我很困惑,我应该在5-6个表中为每个表输入50-100个单词帮助文本

这是我在表单中使用help_text的方式:

student_number = forms.CharField(
        required=False, max_length=64, label='Student Number',
        help_text='Unique identifier for the student ')
Run Code Online (Sandbox Code Playgroud)

python django django-models

18
推荐指数
3
解决办法
2万
查看次数

如何在HTML中的title属性中添加新换行符

我正在使用这个

<a href="#" title="select from 1: this 2: that" > Click here </a>

当有人将鼠标悬停在它上面时,我会在一行中看到所有文字.

有没有办法在新线上显示它?

html css accessibility hover

15
推荐指数
4
解决办法
4万
查看次数

如何在apache 2.4.6上安装apxs模块

我刚刚使用过apt-get update,我的apache已更新为2.4.6.

我想安装apxs来编译模块,我得到这个错误

The following packages have unmet dependencies:
 apache2-prefork-dev : Depends: apache2.2-common (= 2.2.22-1ubuntu1.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题

linux apache ubuntu apache2

10
推荐指数
3
解决办法
3万
查看次数

从服务帐户获取Google API中的AccessTokenRefreshError:invalid_grant

我正在关注这个例子

https://code.google.com/p/google-api-python-client/source/browse/samples/service_account/tasks.py

  credentials = SignedJwtAssertionCredentials(
      '141491975384@developer.gserviceaccount.com',
      key,
      scope='https://www.googleapis.com/auth/tasks')
  http = httplib2.Http()
  http = credentials.authorize(http)

  service = build("tasks", "v1", http=http)

  # List all the tasklists for the account.
  lists = service.tasklists().list().execute(http=http)
  pprint.pprint(lists)
Run Code Online (Sandbox Code Playgroud)

问题是,它有时工作,我把列表作为JSON,并在运行程序几次后,我得到错误

  File "/usr/local/lib/python2.7/site-packages/oauth2client/client.py", line 710, in _do_refresh_request
    raise AccessTokenRefreshError(error_msg)
oauth2client.client.AccessTokenRefreshError: invalid_grant
Run Code Online (Sandbox Code Playgroud)

google-tasks-api

6
推荐指数
1
解决办法
2466
查看次数

用Mercurial以三种方式合并可以保存什么文件?

我在Mercurial中打开了三向合并窗口:

local
base
other
Run Code Online (Sandbox Code Playgroud)
  • 我在分公司A:上hg update A
  • 我想与分支B合并: hg merge B

我想知道的是localbaseother

我读到了这三样如何在Mercurial / Meld中合并工作?但无法得到它。

现在,我想知道来自local,的哪个文件baseother我需要保存?我需要使所有文件都一样吗?会更改其他分支中的文件,还是仅将其保存在我当前的分支A中,而不会触及其他分支?

version-control merge mercurial

5
推荐指数
1
解决办法
695
查看次数

如何从自动下载中停止html5音频

我正在使用这个

<audio src="audio.mp3" />
Run Code Online (Sandbox Code Playgroud)

现在该文件很大,系统会在有人加载页面时自动下载.

是否有任何方式当有人按下播放时,只有系统下载.因为那个玩家在我的每一页都是浪费BW

html css audio html5

2
推荐指数
1
解决办法
2768
查看次数