我有一个django项目。 我将其带到新服务器上。 然后我制作了静电消除器。之后,我在uwsgi上为django网站提供服务。
在我的主页html代码中:
body id =“ skin-blur-city”
在 project / static / css / style.css
中 #skin-blur-city {
background-image: url(../img/body/city.jpg);
}
我的项目目录下的statics目录ID,在Django设置文件中;
STATIC_ROOT = os.path.join(BASE_DIR, "static/")
style.css位于 project / static / css /
图片文件位于 project / static / img / body / city.jpg
但是主页未显示city.jpg背景。 打开页面后从浏览器查看源代码时, 我在HTML代码中看到body id =“ skin-blur-city”。但不显示 浏览器。
浏览器Web控制台的CSS输出为:
Update2:
我将firefox升级到了64位Firefox Quantum 60.10esr。现在错误在下面
Keyframe rule ignored due to bad selector. animate.min.css:1:6679
Keyframe rule ignored due to bad selector. animate.min.css:1:6792
Keyframe rule ignored due to bad selector. animate.min.css:1:6890
Keyframe rule ignored due to bad selector. animate.min.css:1:6987
Keyframe rule ignored due to bad selector. animate.min.css:1:7512
Keyframe rule ignored due to bad selector. animate.min.css:1:7625
Keyframe rule ignored due to bad selector. animate.min.css:1:7723
Keyframe rule ignored due to bad selector. animate.min.css:1:7820
Keyframe rule ignored due to bad selector. animate.min.css:1:8344
Keyframe rule ignored due to bad selector. animate.min.css:1:8456
Keyframe rule ignored due to bad selector. animate.min.css:1:8555
Keyframe rule ignored due to bad selector. animate.min.css:1:8650
Keyframe rule ignored due to bad selector. animate.min.css:1:9171
Keyframe rule ignored due to bad selector. animate.min.css:1:9283
Keyframe rule ignored due to bad selector. animate.min.css:1:9382
Keyframe rule ignored due to bad selector. animate.min.css:1:9477
Keyframe rule ignored due to bad selector. animate.min.css:1:9913
Keyframe rule ignored due to bad selector. animate.min.css:1:9988
Keyframe rule ignored due to bad selector. animate.min.css:1:10077
Keyframe rule ignored due to bad selector. animate.min.css:1:10166
Keyframe rule ignored due to bad selector. animate.min.css:1:10592
Keyframe rule ignored due to bad selector. animate.min.css:1:10694
Keyframe rule ignored due to bad selector. animate.min.css:1:10806
Keyframe rule ignored due to bad selector. animate.min.css:1:11262
Keyframe rule ignored due to bad selector. animate.min.css:1:11363
Keyframe rule ignored due to bad selector. animate.min.css:1:11474
Keyframe rule ignored due to bad selector. animate.min.css:1:11934
Keyframe rule ignored due to bad selector. animate.min.css:1:12036
Keyframe rule ignored due to bad selector. animate.min.css:1:12148
Keyframe rule ignored due to bad selector. animate.min.css:1:12603
Keyframe rule ignored due to bad selector. animate.min.css:1:12704
Keyframe rule ignored due to bad selector. animate.min.css:1:12815
Keyframe rule ignored due to bad selector. animate.min.css:1:13367
Keyframe rule ignored due to bad selector. animate.min.css:1:13474
Keyframe rule ignored due to bad selector. animate.min.css:1:13861
Keyframe rule ignored due to bad selector. animate.min.css:1:13972
Keyframe rule ignored due to bad selector. animate.min.css:1:14356
Keyframe rule ignored due to bad selector. animate.min.css:1:14463
Keyframe rule ignored due to bad selector. animate.min.css:1:14850
Keyframe rule ignored due to bad selector. animate.min.css:1:14961
Keyframe rule ignored due to bad selector. animate.min.css:1:15344
Keyframe rule ignored due to bad selector. animate.min.css:1:15449
Keyframe rule ignored due to bad selector. animate.min.css:1:15838
Keyframe rule ignored due to bad selector. animate.min.css:1:15947
Keyframe rule ignored due to bad selector. animate.min.css:1:16327
Keyframe rule ignored due to bad selector. animate.min.css:1:16432
Keyframe rule ignored due to bad selector. animate.min.css:1:16806
Keyframe rule ignored due to bad selector. animate.min.css:1:16915
Keyframe rule ignored due to bad selector. animate.min.css:1:17456
Keyframe rule ignored due to bad selector. animate.min.css:1:17558
Keyframe rule ignored due to bad selector. animate.min.css:1:17948
Keyframe rule ignored due to bad selector. animate.min.css:1:18052
Keyframe rule ignored due to bad selector. animate.min.css:1:18447
Keyframe rule ignored due to bad selector. animate.min.css:1:18550
Keyframe rule ignored due to bad selector. animate.min.css:1:18944
Keyframe rule ignored due to bad selector. animate.min.css:1:19049
Keyframe rule ignored due to bad selector. animate.min.css:1:19446
Keyframe rule ignored due to bad selector. animate.min.css:1:19548
Keyframe rule ignored due to bad selector. animate.min.css:1:19943
Keyframe rule ignored due to bad selector. animate.min.css:1:20047
Keyframe rule ignored due to bad selector. animate.min.css:1:20441
Keyframe rule ignored due to bad selector. animate.min.css:1:20544
Keyframe rule ignored due to bad selector. animate.min.css:1:20928
Keyframe rule ignored due to bad selector. animate.min.css:1:21033
Keyframe rule ignored due to bad selector. animate.min.css:1:22254
Keyframe rule ignored due to bad selector. animate.min.css:1:22544
Keyframe rule ignored due to bad selector. animate.min.css:1:22767
Keyframe rule ignored due to bad selector. animate.min.css:1:23064
Keyframe rule ignored due to bad selector. animate.min.css:1:23365
Keyframe rule ignored due to bad selector. animate.min.css:1:24166
Keyframe rule ignored due to bad selector. animate.min.css:1:24322
Keyframe rule ignored due to bad selector. animate.min.css:1:24469
Keyframe rule ignored due to bad selector. animate.min.css:1:24611
Keyframe rule ignored due to bad selector. animate.min.css:1:25400
Keyframe rule ignored due to bad selector. animate.min.css:1:25556
Keyframe rule ignored due to bad selector. animate.min.css:1:25703
Keyframe rule ignored due to bad selector. animate.min.css:1:25845
Keyframe rule ignored due to bad selector. animate.min.css:1:26434
Keyframe rule ignored due to bad selector. animate.min.css:1:26582
Keyframe rule ignored due to bad selector. animate.min.css:1:27182
Keyframe rule ignored due to bad selector. animate.min.css:1:27330
Keyframe rule ignored due to bad selector. animate.min.css:1:28119
Keyframe rule ignored due to bad selector. animate.min.css:1:28264
Keyframe rule ignored due to bad selector. animate.min.css:1:28406
Keyframe rule ignored due to bad selector. animate.min.css:1:28542
Keyframe rule ignored due to bad selector. animate.min.css:1:29072
Keyframe rule ignored due to bad selector. animate.min.css:1:29205
Keyframe rule ignored due to bad selector. animate.min.css:1:29757
Keyframe rule ignored due to bad selector. animate.min.css:1:29877
Keyframe rule ignored due to bad selector. animate.min.css:1:29969
Keyframe rule ignored due to bad selector. animate.min.css:1:30399
Keyframe rule ignored due to bad selector. animate.min.css:1:30515
Keyframe rule ignored due to bad selector. animate.min.css:1:30603
Keyframe rule ignored due to bad selector. animate.min.css:1:31058
Keyframe rule ignored due to bad selector. animate.min.css:1:31173
Keyframe rule ignored due to bad selector. animate.min.css:1:31263
Keyframe rule ignored due to bad selector. animate.min.css:1:31713
Keyframe rule ignored due to bad selector. animate.min.css:1:31827
Keyframe rule ignored due to bad selector. animate.min.css:1:31915
Keyframe rule ignored due to bad selector. animate.min.css:1:32363
Keyframe rule ignored due to bad selector. animate.min.css:1:32480
Keyframe rule ignored due to bad selector. animate.min.css:1:32570
Keyframe rule ignored due to bad selector. animate.min.css:1:33006
Keyframe rule ignored due to bad selector. animate.min.css:1:33114
Keyframe rule ignored due to bad selector. animate.min.css:1:33211
Keyframe rule ignored due to bad selector. animate.min.css:1:33649
Keyframe rule ignored due to bad selector. animate.min.css:1:33755
Keyframe rule ignored due to bad selector. animate.min.css:1:33847
Keyframe rule ignored due to bad selector. animate.min.css:1:34313
Keyframe rule ignored due to bad selector. animate.min.css:1:34420
Keyframe rule ignored due to bad selector. animate.min.css:1:34515
Keyframe rule ignored due to bad selector. animate.min.css:1:34978
Keyframe rule ignored due to bad selector. animate.min.css:1:35084
Keyframe rule ignored due to bad selector. animate.min.css:1:35177
Keyframe rule ignored due to bad selector. animate.min.css:1:35633
Keyframe rule ignored due to bad selector. animate.min.css:1:35740
Keyframe rule ignored due to bad selector. animate.min.css:1:35834
Keyframe rule ignored due to bad selector. animate.min.css:1:36235
Keyframe rule ignored due to bad selector. animate.min.css:1:36336
Keyframe rule ignored due to bad selector. animate.min.css:1:36712
Keyframe rule ignored due to bad selector. animate.min.css:1:36813
Keyframe rule ignored due to bad selector. animate.min.css:1:37188
Keyframe rule ignored due to bad selector. animate.min.css:1:37287
Keyframe rule ignored due to bad selector. animate.min.css:1:37652
Keyframe rule ignored due to bad selector. animate.min.css:1:37757
Keyframe rule ignored due to bad selector. animate.min.css:1:38134
Keyframe rule ignored due to bad selector. animate.min.css:1:38238
Keyframe rule ignored due to bad selector. animate.min.css:1:38612
Keyframe rule ignored due to bad selector. animate.min.css:1:38717
Keyframe rule ignored due to bad selector. animate.min.css:1:39585
Keyframe rule ignored due to bad selector. animate.min.css:1:39681
Keyframe rule ignored due to bad selector. animate.min.css:1:39854
Keyframe rule ignored due to bad selector. animate.min.css:1:39942
Keyframe rule ignored due to bad selector. animate.min.css:1:40043
Keyframe rule ignored due to bad selector. animate.min.css:1:40225
Keyframe rule ignored due to bad selector. animate.min.css:1:40354
Keyframe rule ignored due to bad selector. animate.min.css:1:40787
Keyframe rule ignored due to bad selector. animate.min.css:1:40933
Keyframe rule ignored due to bad selector. animate.min.css:1:41357
Keyframe rule ignored due to bad selector. animate.min.css:1:41491
Unknown property ‘-moz-osx-font-smoothing’. Declaration dropped. font-awesome.min.css:15:178
Unrecognized at-rule or error parsing at-rule ‘@-o-keyframes’. font-awesome.min.css:15:1165
Unrecognized at-rule or error parsing at-rule ‘@-ms-keyframes’. font-awesome.min.css:15:1248
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. font-awesome.min.css:15:1413
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. font-awesome.min.css:15:1632
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. font-awesome.min.css:15:1856
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. font-awesome.min.css:15:2085
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. font-awesome.min.css:15:2306
Unknown pseudo-class or pseudo-element ‘-webkit-input-placeholder’. Ruleset ignored due to bad selector. form.css:4:2
Unknown pseudo-class or pseudo-element ‘-ms-input-placeholder’. Ruleset ignored due to bad selector. form.css:16:2
Error in parsing value for ‘color’. Declaration dropped. form.css:80:1
Unknown pseudo-class or pseudo-element ‘-ms-expand’. Ruleset ignored due to bad selector. form.css:94:8
Error in parsing value for ‘background’. Declaration dropped. form.css:159:16
Error in parsing value for ‘background’. Declaration dropped. form.css:161:16
Error in parsing value for ‘background’. Declaration dropped. form.css:162:16
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. form.css:169:12
Error in parsing value for ‘opacity’. Declaration dropped. form.css:170:13
Unknown property ‘user-select’. Declaration dropped. form.css:638:16
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. form.css:665:14
Error in parsing value for ‘background-image’. Declaration dropped. form.css:738:24
Error in parsing value for ‘background-color’. Declaration dropped. form.css:752:31
Error in parsing value for ‘background-color’. Declaration dropped. form.css:787:31
Error in parsing value for ‘background-color’. Declaration dropped. form.css:814:31
Unknown property ‘-moz-border-radius’. Declaration dropped. form.css:1141:25
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. form.css:1181:14
Unknown property ‘-moz-box-shadow’. Declaration dropped. form.css:1382:22
Unknown property ‘-moz-box-shadow’. Declaration dropped. form.css:1399:22
Unknown property ‘pointer-event’. Declaration dropped. form.css:1473:19
Unknown property ‘-moz-border-radius’. Declaration dropped. form.css:1556:24
Unknown property ‘-moz-opacity’. Declaration dropped. form.css:1601:18
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. form.css:1604:13
Unknown property ‘-moz-border-radius’. Declaration dropped. form.css:1654:24
Unknown property ‘-moz-opacity’. Declaration dropped. form.css:1658:18
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. form.css:1661:13
Unknown property ‘-moz-border-radius’. Declaration dropped. form.css:1711:24
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. calendar.css:213:10
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. calendar.css:353:10
Unknown pseudo-class or pseudo-element ‘selection’. Ruleset ignored due to bad selector. style.css:44:2
Error in parsing value for ‘overflow-x’. Declaration dropped. style.css:63:17
Error in parsing value for ‘height’. Declaration dropped. style.css:276:13
Error in parsing value for ‘cursor’. Declaration dropped. style.css:315:13
Expected declaration but found ‘*’. Skipped to next declaration. style.css:1799:5
Expected declaration but found ‘*’. Skipped to next declaration. style.css:1800:5
Unknown pseudo-class or pseudo-element ‘-webkit-input-placeholder’. Ruleset ignored due to bad selector. select2-bootstrap.min.css:1:847
Unknown pseudo-class or pseudo-element ‘-ms-input-placeholder’. Ruleset ignored due to bad selector. select2-bootstrap.min.css:1:1111
Unknown property ‘user-select’. Declaration dropped. select2.min.css:1:233
Unknown property ‘user-select’. Declaration dropped. select2.min.css:1:785
Unknown pseudo-class or pseudo-element ‘-webkit-search-cancel-button’. Ruleset ignored due to bad selector. select2.min.css:1:1248
Unknown property ‘user-select’. Declaration dropped. select2.min.css:1:1617
Unknown pseudo-class or pseudo-element ‘-webkit-search-cancel-button’. Ruleset ignored due to bad selector. select2.min.css:1:2190
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. select2.min.css:1:2498
Error in parsing value for ‘background-image’. Declaration dropped. select2.min.css:1:8947
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. select2.min.css:1:9091
Error in parsing value for ‘background-image’. Declaration dropped. select2.min.css:1:9985
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. select2.min.css:1:10129
Error in parsing value for ‘background-image’. Declaration dropped. select2.min.css:1:11521
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. select2.min.css:1:11661
Error in parsing value for ‘background-image’. Declaration dropped. select2.min.css:1:12036
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. select2.min.css:1:12180
Expected ‘none’, URL, or filter function but found ‘Alpha(’. Error in parsing value for ‘filter’. Declaration dropped. jquery-ui.min.css:4:624
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. jquery-ui.min.css:4:8263
Expected ‘none’, URL, or filter function but found ‘Alpha(’. Error in parsing value for ‘filter’. Declaration dropped. jquery-ui.min.css:4:14313
Expected ‘none’, URL, or filter function but found ‘Alpha(’. Error in parsing value for ‘filter’. Declaration dropped. jquery-ui.min.css:4:14460
Expected ‘none’, URL, or filter function but found ‘Alpha(’. Error in parsing value for ‘filter’. Declaration dropped. jquery-ui.min.css:4:14535
Expected ‘none’, URL, or filter function but found ‘Alpha(’. Error in parsing value for ‘filter’. Declaration dropped. jquery-ui.min.css:4:24990
Expected ‘none’, URL, or filter function but found ‘Alpha(’. Error in parsing value for ‘filter’. Declaration dropped. jquery-ui.min.css:4:25153
Error in parsing value for ‘width’. Declaration dropped. proj1.generics.css:11:16
Error in parsing value for ‘height’. Declaration dropped. proj1.generics.css:12:16
Error in parsing value for ‘line-height’. Declaration dropped. proj1.generics.css:13:21
Error in parsing value for ‘-webkit-text-size-adjust’. Declaration dropped. bootstrap.min.css:7:140
Unknown pseudo-class or pseudo-element ‘-webkit-inner-spin-button’. Ruleset ignored due to bad selector. bootstrap.min.css:7:1418
Unknown pseudo-class or pseudo-element ‘-webkit-search-cancel-button’. Ruleset ignored due to bad selector. bootstrap.min.css:7:1652
Unknown property ‘orphans’. Declaration dropped. bootstrap.min.css:7:2441
Unknown property ‘widows’. Declaration dropped. bootstrap.min.css:7:2450
Error in parsing value for ‘outline’. Declaration dropped. bootstrap.min.css:7:3387
Error in parsing value for ‘margin-top’. Declaration dropped. bootstrap.min.css:7:22557
Error in parsing value for ‘outline’. Declaration dropped. bootstrap.min.css:7:22806
Unknown pseudo-class or pseudo-element ‘-ms-input-placeholder’. Ruleset ignored due to bad selector. bootstrap.min.css:7:23653
Unknown pseudo-class or pseudo-element ‘-webkit-input-placeholder’. Ruleset ignored due to bad selector. bootstrap.min.css:7:23700
Unknown property ‘user-select’. Declaration dropped. bootstrap.min.css:7:29054
Error in parsing value for ‘outline’. Declaration dropped. bootstrap.min.css:7:29142
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:29505
Unknown property ‘-moz-osx-font-smoothing’. Declaration dropped. bootstrap.min.css:7:36771
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:46841
Unknown property ‘zoom’. Declaration dropped. bootstrap.min.css:7:75675
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:88388
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:88497
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:89617
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:89671
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:90512
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:90559
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:94454
Error in parsing value for ‘background-image’. Declaration dropped. bootstrap.min.css:7:94593
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:94804
Error in parsing value for ‘background-image’. Declaration dropped. bootstrap.min.css:7:94974
Expected ‘none’, URL, or filter function but found ‘progid’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:95185
Expected ‘none’, URL, or filter function but found ‘alpha(’. Error in parsing value for ‘filter’. Declaration dropped. bootstrap.min.css:7:95404
Error in parsing value for ‘background-color’. Declaration dropped. bootstrap.min.css:7:96344
Unrecognized at-rule or error parsing at-rule ‘@-ms-viewport’. bootstrap.min.css:7:98317
Unknown property ‘-moz-text-rendering’. Declaration dropped. icons.css:6:25
Unknown property ‘-moz-font-smoothing’. Declaration dropped. icons.css:11:25
Unknown property ‘font-smoothing’. Declaration dropped. icons.css:14:20
Expected media feature name but found ‘-webkit-min-device-pixel-ratio’. icons.css:114:18
Expected media feature name but found ‘-o-min-device-pixel-ratio’. icons.css:116:18
Expected media feature name but found ‘min-device-pixel-ratio’. icons.css:117:18
Unknown property ‘user-select’. Declaration dropped. reps.css:270:15
答案 0 :(得分:0)
这是因为我使用了浏览器。 Style.css有两个背景选项。 对于移动设备和旧的浏览器,它仅显示背景颜色。 对于新的台式电脑浏览器,它显示背景图片。 所以我在PC上使用了Firefox,而不是在centos gnome桌面上打开了Firefox浏览器。现在可以了。