I placed a green png image as the background for the div and looks like this:
I used a CSS hack to save text inside a green background. So this is my HTML for this section:
<section id="aboutprocess"> <div class="container"> <div class="row"> <div class="col-md-8 "> <p class="text-center">Our agile team continuously delivers working software and empowers your organization to embrace changing requirements. </p> <button type="button" class="btn btn-link center-block white" role="link" type="submit" name="op" value="Link 2">about our process</button> </div> <!--end col-md-8 col-md-offset-2--> </div> <!--end row --> </div> <!--end container--> </section> <!--end aboutprocess-->
And this is CSS:
#aboutprocess { background: url("../img/tech_bg.png") no-repeat left top; width: 100%; background-size: cover; } #aboutprocess .container { padding-top: 32.6316%; position: relative; } #aboutprocess .row { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; } #aboutprocess p { color: #ffffff; text-align: center; }
Now I want to replace the png with the svg file, and the only thing I changed in CSS is the file extension:
#aboutprocess { background: url("../img/tech_bg.svg") no-repeat left top; width: 100%; background-size: cover; }
But when I view this in the browser, I no longer see the background:
What am I doing wrong? You can see the demo page with the background image png here .
Thank you for your help.
EDIT: Here is the Dropbox link to the SVG file.
, , , tech_bg.svg , ( img), , , . GitHub, , , SVG (.svg vs .SVG).
OP, . : . , SVG? , , Illustrator? .
, , z-index #aboutprocess, ( , , , , ). CSS , , , .. .
z-index
#aboutprocess
, . , IE8 Android 2.3 , .
, , , .
css. .htaccess, svg css (background: url ( "../img/tech_bg.svg" ) no- repeat left top;), :
RewriteRule !\.(js|ico|gif|jpg|jpeg|svg|bmp|png|css|pdf|swf|mp3|mp4|3gp|flv|avi|rm|mpeg|wmv|xml|doc|docx|xls|xlsx|csv|ppt|pptx|zip|rar|mov)$ index.php
, , , , , , " svg" .htaccess.
, !:)
.pic { width: 20px; height: 20px; background-image: url("../img/tech_bg.svg"); }
dont foreget points /--- > ../ --- > background-image:
<div class="pic"></div>
, , - ( Google): svg, - "content-type". - "application/octet-stream" "text/xml", , , , SVG .
SVG image/svg+xml
image/svg+xml
Source: https://habr.com/ru/post/1663146/More articles:Why are Postgres queries on jsonb columns so slow? - indexingTesting components of a child component on a send using Vee-Validate - vue.jsWhy is my use of any method in Python so slow? - performanceConfirm child login components to send using Vee-Validate and vue js 2 - javascriptvee-validate error object - _vm.errors undefined - vue.jsUsing Google Cloud Machine Learning to Predict Using the Retrained Inception Model - tensorflowHow to ask user to change default applications - androidChoosing between overloading primitive types or using a reference to a Number object - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1663150/how-to-feed-multiple-files-to-a-background-process-using-makefile&usg=ALkJrhjJUEipJvGSDdqFweZLNR-pyqZcQACrap Wrap Function in Java Callable - javaAll Articles