html – 图像不显示 – 样式“display:none”来自哪里?

前端之家收集整理的这篇文章主要介绍了html – 图像不显示 – 样式“display:none”来自哪里?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我在一个相当简单的网站中包含一个图像,但它没有出现.在Chrome中检查元素样式会显示最终(在所有继承样式之后的顶部)样式

  1. element.style {
  2. display: none !important;
  3. }

果然,如果我取消设置该样式,则会出现图形轮廓并调整页面高度以适应它.但我不知道这种风格来自哪里 – 它似乎是动态添加它的东西.这是我用来创建页面的Django模板(图像是< section class =“secondary col”>):

  1. {% load markup %}
  2. Meta charset="utf-8"/>
  3. <Meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0" />
  4. O'Reilly 50% Ebook Deal of the Day

第一个样式文件是normalize.css v3.0.1. styles.css如下所示.

  1. body{font:62.5% arial,helvetica,sans-serif;min-width:815px;background-color:#f6f6ef}
  2. .pageheader{font-size:1.4em;background-color:#f6f6ef;padding:0 2em;height:10em;border-bottom:1px solid #eae7d1}
  3. .pageheader h1{margin:0;position:relative;top:1em;display:inline-block}
  4. .pageheader h1 a{background:transparent url(images/logo.png) no-repeat left top;display:block;text-indent:-9999em;height:225px;width:207p
  5. x}
  6. /*logo flip*/
  7. .pageheader h1 a:hover{
  8. -webkit-transition-delay:.5s;
  9. -moz-transition-delay:.5s;
  10. -webkit-transform-style:preserve-3d;
  11. -webkit-transition: -webkit-transform 1.7s;
  12. -webkit-transform:rotateX(360deg);
  13. -moz-transform:rotateX(360deg);
  14. -moz-transform-style:preserve-3d;
  15. -moz-transition-duration: 1.5s;
  16. }
  17. .tagline{font-size:2em;font-weight:bold;color:rgba(0,.1);
  18. font-family:"Gill Sans","Gill Sans MT","Trebuchet MS",sans-serif;
  19. text-shadow:1px 1px 3px rgba(0,.1);
  20. margin:-6em 0 0 30%;
  21. -moz-transition:all .4s ease-in-out;-webkit-transition:all .4s ease-in-out;
  22. }
  23. .tagline:hover{color:rgba(0,.2);text-shadow:3px 3px 4px rgba(0,.2);}
  24. h1,h2,h3,.h1,.h2,.h3,.inline{font-family:"Gill Sans",sans-serif;color:#444}
  25. .content div section p strong {font-weight:bold;font-size:18px} [28/1894]
  26. .content a {color:#449}
  27. .content a :hover{color:#66c}
  28. h1{margin:.5em 0 .25em}
  29. h2{margin:.6666em 0 .3333em}
  30. h3{font-size:16px;margin:7px 0 5px}
  31. .content{font-size:1.3em;background-color:#fff;padding:0 2em;z-index:10}
  32. .content p{line-height:1.7142;margin:.5em 0}
  33. .content ul{list-style-position:outside;padding-left:1em;list-style-type:none}
  34. .pagenav{margin:.6em 0 0 30%}
  35. .pagenav a{font-size:1.0714em;color:#4646e9;font-weight:bold;text-transform:uppercase;text-decoration:none;text-shadow:1px 1px 2px rgba(0,.2);
  36. -moz-transition:all .2s ease-in-out;
  37. -webkit-transition:all .2s ease-in-out;
  38. }
  39. .pagenav a:hover{
  40. text-decoration:underline;
  41. /* just a little too much
  42. font-size:110%;
  43. -moz-transform:scale(2);
  44. -webkit-transform:scale(2);
  45. -moz-text-size-adjust: 120%;
  46. -webkit-text-size-adjust: 120%;*/
  47. }
  48. ul.inline_list{list-style-type:none;padding:0;margin:0}
  49. ul.inline_list li{display:inline;margin-right:1em}
  50. .col{padding:1em 0}
  51. .secondary{line-height:1.6;float:left;width:25%;overflow:hidden;padding-top:11em}
  52. .primary{font-size:1.0769em;line-height:1.6;width:60%;margin-left:30%;max-width:700px;padding-bottom:3em}
  53. footer{font-size:1.3em;clear:both;background-color:#f6f6ef;padding:.5em 2em;border-top:1px solid #092694;height:14em}
  54. footer .primary{padding-top:0;padding-bottom:0}
  55. footer .primary nav{margin-top:.5em}
  56. .bluebar{
  57. background-image: linear-gradient(bottom,#092794 0%,#5475EE 100%);
  58. background-image: -o-linear-gradient(bottom,#5475EE 100%);
  59. background-image: -moz-linear-gradient(bottom,#5475EE 100%);
  60. background-image: -webkit-linear-gradient(bottom,#5475EE 100%);
  61. background-image: -ms-linear-gradient(bottom,#5475EE 100%);
  62. background-image: -webkit-gradient(
  63. linear,left bottom,left top,color-stop(0,#092794),color-stop(1,#5475EE)
  64. );
  65. }
  66. footer p{margin:.5em 0}
  67. .bluebar{height:20px}
  68. footer h1{font-size:1.2em}
  69. .email{margin-right:1em}
  70. .shadow{Box-shadow:1px 1px 2px rgba(0,.2)}
  71. .footnav ul{list-style-type:none;position:absolute;top:-6em;left:27em}
  72. .hw{border-bottom:1px solid #eee;padding-bottom:3em}
  73. .hw,.tob{margin:3em 0}

来自滔滔不绝的线索将帮助我再次行动起来.

最佳答案
这可能是由于本地计算机上运行的广告拦截软件造成的.

猜你在找的CSS相关文章