c# – MVC3中的CSS背景图像 – 续
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了c# – MVC3中的CSS背景图像 – 续,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1110字,纯文字阅读大概需要2分钟。
内容图文
我最近购买了一个我试图应用于我的MVC3 Web App项目的引导主题.
我在使用social-icons.css渲染背景图像时遇到问题.
在_Layout.cshtml中我引用了:
link href="@Url.Content("~/Content/social-icons.css")" rel="stylesheet" type="text/css"
在标题中.
在social-icons.css中:
[class^="social-"],
[class*="social-"] {
display: inline-block;
width: 40px;
height: 40px;
margin-right: .3em;
line-height: 40px;
vertical-align: text-top;
background-image: url("img/icons/social-icon-set.png");
background-position: 40px 40px;
background-repeat: no-repeat;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
-webkit-border-radius: 50em;
-moz-border-radius: 50em;
border-radius: 50em;
}
我检查了social-icons.css的两个路径
和social-icons-set.png和所有内容都出现在up和up上.
我在这里检查了Q& A这对我没有帮助. CSS background images in MVC3
想提前为任何不清楚的信息道歉.
解决方法:
您的图像位置错误.
这是你拥有的:
background-image: url("img/icons/social-icon-set.png");
我们可以看到你的截图,它是社交图标集(注意额外的“s”):
内容总结
以上是互联网集市为您收集整理的c# – MVC3中的CSS背景图像 – 续全部内容,希望文章能够帮你解决c# – MVC3中的CSS背景图像 – 续所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。