不使用CSS显示图像 [英] Not showing images using CSS

查看:71
本文介绍了不使用CSS显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已应用CSS

CSS applied

/* DEMO TABLE */
body {
    font-size: 75%;
    font-family: Verdana, Tahoma, Arial, "Helvetica Neue", Helvetica, Sans-Serif;
    color: #232323;
    background-color: #fff;
}
table { border-spacing:0; border:1px solid gray;}
table.tablesorter thead tr .header {
	background-image: url(Content/images/bg.png);
	background-repeat: no-repeat;
	background-position: center right;
	cursor: pointer;
}
table.tablesorter tbody td {
	color: #3D3D3D;
	padding: 4px;
	background-color: #FFF;
	vertical-align: top;
}
table.tablesorter tbody tr.odd td {
	background-color:#F0F0F6;
}
table.tablesorter thead tr .headerSortUp {
	background-image:url(Content/images/asc.png);
}
table.tablesorter thead tr .headerSortDown {
	background-image: url(Content/images/desc.png);
}
table th { width:150px; 
           border:1px outset gray; 
           background-color:#3C78B5; 
           color:White; 
           cursor:pointer;
}
table thead th:hover { background-color:Yellow; color:Red;}
table td { width:150px; border:1px solid gray;}





Html in .aspx
<pre lang="HTML">    <script type="text/javascript">
        $(function () {
            $("table.tablesorter").tablesorter({ widthFixed: true, sortList: [[0, 0]] })
            .tablesorterPager({ container: $("#pager"), size: $(".pagesize option:selected").val() });
        });
    </script>

    <h2><%: ViewBag.Message%></h2>
    <div>
        <table id="tablesorter" class="tablesorter">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Surname</th>
                    <th>Email</th>
                    <th>Phone</th>
                    <th>Date Added</th>
                </tr>
            </thead>
            <tbody>
                <%  {
                        foreach (var p in ViewBag.People)
                        { %>        
                    <tr>
                        <td><%: p.Name%> </td>
                        <td><%: p.Surname%></td>
                        <td><%: p.Email%></td>
                        <td><%: p.Phone%></td>
                        <td><%: p.DateAdded%></td>
                    </tr>
                   <% } %> 
               <%} %>
            </tbody>
        </table>
        <div id="pager" style="removed:inherit;">
            <form>
            <img alt="" src="<%: Url.Content("~/Content/images/first.png") %>" class="first" /><%--"@Url.Content("~/Content/images/first.png")"--%>
            <img alt="" src="<%: Url.Content("~/Content/images/prev.png") %>" class="prev" />
            <input type="text" class="pagedisplay" />
            <img alt="" src="<%:Url.Content("~/Content/images/next.png") %>" class="next" />
            <img alt="" src="<%: Url.Content("~/Content/images/last.png") %>" class="last" />
            <select class="pagesize">
                <option selected="selected" value="5">5</option>
                <option value="10">10</option>
                <option value="20">20</option>
                <option value="30">30</option>
                <option value="40">40</option>
            </select>    
            </form>        
        </div>
    </div>



上面我在我的.aspx文件中给出了我应用的css和html代码.我正在使用它,但是它没有在表头显示图像.



Above i have given the css i applied and the html code in my .aspx file. I''m using this but its not showing images in the header of table. I''m not getting this y this is not happening?

推荐答案

(function(){
(function () {


("table . tablesorter).tablesorter({: 正确,sortList:[[0,0]]} ) . tablesorterPager({容器 :
("table.tablesorter").tablesorter({ widthFixed: true, sortList: [[0, 0]] }) .tablesorterPager({ container:


(#pager"),大小:
("#pager"), size:


这篇关于不使用CSS显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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