小编Twi*_*zle的帖子

CSS背景图像不起作用

我不知道发生了什么,但似乎背景图像没有加载.

的test.html:

<div class="pToolContainer">
     <span class="btn-pTool">
         <a class="btn-pToolName" href="#"></a>
     </span>
     <div class="pToolSlidePanel"></div>
</div>
Run Code Online (Sandbox Code Playgroud)

style.css中:

    .btn-pTool{
    margin:0;
    padding:0;
    background-image: url(slide_button.png);
    background-repeat:no-repeat;
    }

    .btn-pToolName{
        text-align: center; 
        width: 26px; 
        height: 190px; 
        display: block; 
        color: #fff; 
        text-decoration: none;  
        font-family: Arial, Helvetica, sans-serif;  
        font-weight: bold; 
        font-size: 1em; 
        line-height: 32px; 
    }
Run Code Online (Sandbox Code Playgroud)

顺便说一下,图像确实存在于test.html的文件夹中.

html css background-image

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

对象没有方法Javascript

我不知道为什么我会遇到这个问题.我之前在javascript中使用过原型并且它工作正常但是由于某种原因它在这里不起作用:

的test.html:

<script type="text/javascript">
        $(document).ready(function(){
        UserOptions("test");
    });
</script>
Run Code Online (Sandbox Code Playgroud)

UserOptions.js:

 function UserOptions(username){
    ...
    var userOptions = document.createElement("div");
    userOptions.className = "userOptions";
    **this.createBtns(userOptions);**
    userContainer.appendChild(userOptions);


    contentCenter.appendChild(userContainer);
    contentCenter.appendChild(br);

    BuddyList();
    }

    UserOptions.prototype = {
        createBtns:function(parent){
            var self = this;
            /* Add Buddy Button */
            var addBtnContainer = document.createElement("div");
            addBtnContinaer.className = "addBtnContainer";
    ...}
Run Code Online (Sandbox Code Playgroud)

我一直得到错误对象没有方法'createBtns'

javascript prototype

0
推荐指数
1
解决办法
8821
查看次数

标签 统计

background-image ×1

css ×1

html ×1

javascript ×1

prototype ×1