样式表未显示在div ID标签中? [英] Stylesheet not displaying within div id tab?

查看:106
本文介绍了样式表未显示在div ID标签中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的网页上的代码,我想让我的样式表说你好!显示在TAB1上,但不显示。需要做什么变化来显示我的样式表从Pastebin在TAB1?我可以在过去做到这一点,但现在我不确定我在这里做错了。

This is the code on my webpage, I'm trying to make my stylesheet that says "Hello!" display on TAB1, but it isn't displaying. What changes need to be made to display my stylesheet from Pastebin in TAB1? I was able to do this in the past but now I'm unsure what I'm doing wrong here.

我的网页是非常有限的字符,所以我必须使用Pastebin把我所有的写入我的页面,因为我只剩下另一个2000-2200字符,我可以使用,这绝对只是足够的编码,不是把文本的墙壁在我将要做的每个选项卡。

MY WEBPAGE IS VERY LIMITED with characters, so I MUST use Pastebin to put all of my writing into my page, since I only have another 2000-2200 characters left that I can use, which is definitely only enough for coding, not putting walls of text on each tab I'll be making, as well.

<style>

    body{
    color:#000000;
    font-size:13px;
    font-family:Ebrima;
    background-image: url() !important;
    background-color:#FFFFFF !important;
    background-position:bottom-center !important;
    background-repeat:repeat !important;}

    h1{
    margin:0px 0px 0px;
    font-size: 10px;
    color:#FF0000;
    font-family:Ebrima;
    letter-spacing:0px;
    font-weight:normal;
    text-shadow: 0px 0px 2px #880000;}

    b, strong { font-family: Ebrima; font-size: 12px;line-height: 10px; font-weight: bold;
    color: #FF5555;}

    i, em {color:#FF0000; font-family: Ebrima; font-size:12px;}

    #navi{
    display: inline;
    padding:40px;
    color:#444444;
    text-transform: uppercase;
    margin: 12px 10px;
    font-size: 15px;
    font-family:Garamond;
    background: #;
    transition: all .2s;
    -o-transition: all .2s;
    -webkit-transition: all .2s;
    -moz-transition: all .2s;}

    #navi:hover{
    color:#FF0000;
    cursor:hand;
    cursor:pointer;
    opacity: .80;
    font-size:14px;
    font-family:Garamond;
    filter:alpha(opacity=80);
    transition: all .2s;
    -o-transition: all .2s;
    -webkit-transition: all .2s;
    -moz-transition: all .2s;}

    #A{
    left:0px;
    width: 100%;
    top:15px;
    padding: 0px;
    text-align: center;
    position: fixed;
    height: 0px;
    background:url('http://i.imgur.com/TebRLUr.png');}

    #B{margin-top:150px;}

    #C{
    position:fixed;
    bottom:0px;
    left:20px;
    width:99%;
    height:70%;
    background-color:#;
    color:#ffffff;
    padding:0px;
    overflow:auto;
    -moz-border-radius: 10px 10px 10px 10px;
    -webkit-border-radius: 10px 10px 10px 10px;
    border-radius: 10px 10px 10px 10px; }

    ::-webkit-scrollbar {width: 6px; height: 4px; background: #; }
    ::-webkit-scrollbar-thumb { background-color: #222222; border: 1px solid #000000;-webkit-border-radius: 1ex; }


    #navi a{
    text-decoration:none;
    color:#666;}

    #navi a:hover{
    text-decoration:none;
    color:#666;}

    </style>



    <div id="A">
    <div id="B">
    <span id="navi" onclick="document.getElementById('start').innerHTML=document.getElementById('a').innerHTML;">TAB1</span>
    </div>
    </div>





    <div id="C">
    <div id="start">

<font color="#FF0000">This is the opening page!</font>

    </div>

    <div id="a" style="display:none;">

<font color="#FF0000">This is TAB1!</font>

<br>

<link rel="stylesheet" type="text/css" href="http://pastebin.com/raw.php?i=faJtrCxF">

<br>

<font color="#FF0000">The stylesheet will not display inside of this tab. Why?</font>


    </div>
</style>


推荐答案

问题与您的其他问题 Pastebin不会生成有效的CSS文件,而是生成文本文件。

The problem is the same as in your other question Pastebin will not generate a valid CSS file, but a text file.

以这种方式想一想。您的网站从扩展名为.css的文件解释您的样式

如果此文件不是.css但是其他的,它将无法工作。

Think of it in this way. Your website interprets your styles from a file with an extension of .css
If this file is not .css but something else, it won't work.

Pastebin不会将您的代码导出为.css,即使它内部是有效的CSS代码。这样做的原因是,他们提供的服务不是托管,而是一种共享代码片段的方式,这就是为什么他们只导出您创建的文本文件。

Pastebin will not export your code as .css even if what is inside it is valid CSS code. The reason for this is that the service they provide is not hosting, but a way of sharing code snippets, that is why they only export what you create there as text files.

有什么特别的原因让css托管在别的地方?一般不是一个好主意,除非你想使用CDN服务。

Is there a special reason for having the css hosted somewhere else? it is generally not a good idea, unless you want to use a CDN service.

PD:不要使用< font& / code>标记,这已被弃用。改为使用< p> < span> < h #> ,并在需要特定样式时向他们添加类。

PD: Don't use the <font> tag, this has been deprecated. Use instead a combination of <p>, <span>, <h#> and add classes to them when you need specific styles.

这篇关于样式表未显示在div ID标签中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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