background-image

Background cuts off when html and body height are set to 100%

走远了吗. 提交于 2019-12-11 03:43:16
问题 I have my html and body set to 100% height, and a background image set on body, which gets cut off when scrolling down, as shown below. However, YouTube has 100% height on html and body, and a background on body, and it stretches to the full height of the content. How can I achieve this? 回答1: If the only reason you put the 100% height is for the background (as one of your comments seems to suggest), then just change that to min-height: 100% and you should have no issues. You will have 100%

Floated image with variable width and heading with background image

 ̄綄美尐妖づ 提交于 2019-12-11 03:09:14
问题 I have the following code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test</title> <style type="text/css"> body {font-family:Arial, Helvetica, sans-serif;font-size:12px;} .article {width:600px;} .image_container {float:left;margin-right:10px;} h1 {height:50px;line-height:50px;background:url(left.png) no-repeat 0 0;} h1 span {display:block;padding:0 10px

Background image renders differently on server then on localhost

99封情书 提交于 2019-12-11 02:53:05
问题 I have setup streched background on the homepage of https://picup.it through the class <div class="bg-background"> Which is defined as below: .bg-background { height: 100%; } .bg-background:after{ background: url({% static "images/picup-bg-01.jpg" %}) no-repeat; background-size: 100%; content: ""; opacity: 0.6; top: 0; left: 0; bottom: 0; right: 0; position: absolute; z-index: -1; }; However, it looks slight different on localhost. In production (picup.it) background image is stretched to the

html2canvas missing background

独自空忆成欢 提交于 2019-12-11 02:52:40
问题 I am using html2canvas to generate image from my html page. When I enter my url http://prompter.rareapps.org/prompt/prompt-save2.php?p=123 in webpage renderer of html2canvas website (http://html2canvas.hertzen.com/screenshots.html) my page is rendered corectly with background. But when I generate my own canvas, I do not have the background. Here is my code <script type="text/javascript"> $( document ).ready(function() { html2canvas(document.body, { allowTaint: true, taintTest: false,

Setting CSS background-image where the image is a resource or WebResource in a .NET assembly

喜你入骨 提交于 2019-12-11 02:51:46
问题 I am writing an ASP.NET server control that will live in its own assembly. It's a refactoring of something already in the app, which uses CSS background images. I don't want to require the user of the assembly to have to install a separate images folder, so -- if it's possible -- I'd like to store the images as resources in the server control's assembly. But I'd still like to use CSS to set them as background images. Unless I'm mistaken, CSS is my only option for setting background images. Is

Is there an HTML code that can make my background picture transparent and my text non-transparent?

社会主义新天地 提交于 2019-12-11 02:12:45
问题 Okay so I've been typing some HTML code for a technology class that I need to satisfy for my Education major. This is what i have for my background: body { background-image:url('islandbeach.jpg'); background-repeat:repeat; background-position:center; background-attachment:fixed; background-size:cover; } Now, I want to make my background transparent or faded so I can see the text and the other image that I have. The background is too colorful to be able to see the words without having to

Background images and SEO

半城伤御伤魂 提交于 2019-12-11 01:47:30
问题 At the moment I have on my website some images which are defined in the CSS file as a background image. The code looks like this. The HTML: <a href="http://domain.com" title="Website Title" class="image"></a> The CSS: .image { background: url("../img/deelnemende-organisaties/arcadis.png") no-repeat; } Due to some other CSS3 effects with this background it isn't possible to change the background to a normal <img> tag. Now I was wondering what is the best way to use background images and

SVG as a background-image in MIXIN setting color via a SASS variable

﹥>﹥吖頭↗ 提交于 2019-12-11 01:45:15
问题 I am trying to achieve a cross browser CSS background image SVG. In a mixin so I can dynamically use the SVG in different colours by calling the mixin. I have the following example which I have run through the optimiser on this page http://codepen.io/tigt/post/optimizing-svgs-in-data-uris which I am trying to use to prove the idea. But while it works in Chrome and Edge, I can't figure out how to get it to work in FF or IE11. Providing a fall back is tricky because I need to use quite a number

Java background JFrame with a Jpanel arranging images in a grid

◇◆丶佛笑我妖孽 提交于 2019-12-11 01:17:04
问题 so I've been working on my program and I am having trouble getting setting up a JFrame with a background image of a network map and then setting a JPanel using a MigLayout on top of the JFrame which will allow me to place images in accordance to the network map. I have seen several different ways on how to set a background image and have tried using an example I found elsewhere on this site but it's not quite working. Also, I researched more on this and found that having a JPanel ontop of a

Making a dotted grid with CSS

…衆ロ難τιáo~ 提交于 2019-12-11 01:05:25
问题 I want the whole body to have a dotted grid body { background-image: radial-gradient(black 1px, transparent 0); background-size: 40px 40px; } The problem is that I want to shift it so that a dot is placed at the point (0, 0), i.e. the top left corner of the body . So the whole structure should be shifted at -20px, -20px . Or probably there is a better solution? 回答1: Update The following solution works, but only for a fixed background-size . See @Temani Afif's answer for a better solution.