background-image

ASP.NET MVC Website, how to generate background img for div but the img is on a remote drive

纵然是瞬间 提交于 2019-12-12 04:28:22
问题 The View: <div class="project" style="background-image: url('@project.ProjectLogoPath')"> The Model: public List<Projects> GetProjects() { DataContext dbContext = new DataContext(); List<Projects> projects_list = new List<Projects>(); foreach (Project p in dbContext.Projects) { Projects c = new Projects(); c.ProjectName = p.p_name; c.ProjectNumber = p.p_num; c.CompanyName = p.co_name; c.ClientName = p.cl_name; c.ProjectLogoPath = "../../Storage/" + p.co_name + "/Clients/" + p.cl_name + "/" +

How to display parent's bg-image over child elements bg-color?

我们两清 提交于 2019-12-12 04:26:10
问题 So I have a section with lines of content in it. The lines cover 100% of width of the window, the content, however, is only shown at the right side of section. On the left there must be an image. I tried to do it with bg-image and z-index but problem is its getting buried beneath lines' bg-color. So i wonder if there is a smart way to do it or the only way is to use inline image tag? Codepen: https://codepen.io/anon/pen/KazpYM <p>it is impossible to edit cofe on mobile so i just give u a link

How do I add a cycle style repeating image phase background to my website?

点点圈 提交于 2019-12-12 04:23:57
问题 The question title says it all, I am not sure how to organize it in to my websites HTML due to the fixed menu bar, and its over all build. So to say, I want my website to have multiple backgrounds that fade in and out. I intend on adding more backgrounds over time. What I listed below is what I've been attempting to work with. body { width: 400px; height: 400px; } /* set `#slideshow` parent background color */ .slideshow { background: #000; display:block; width:inherit; height:inherit; }

Adding a fade in and out transition to background image on hover

醉酒当歌 提交于 2019-12-12 04:21:40
问题 I have a simple navigation system in a sidebar on a page that you can see here. As you can see when you hover over one of the links in the sidebar the background image changes as I have set a different background URL for hover in the CSS. I am looking for a simple way of adding a transition effect, so that the hover background image fades in and out. I have tried a couple of jQuery methods without success. I am wondering if there is a way of adding a fade transition using jQuery or some other

Bootstrap .page-header background image

主宰稳场 提交于 2019-12-12 04:21:23
问题 I am playing with Bootstrap for first time, but I am a little stucked with a basic stuff like stretching of background image. My code looks like that: CSS .page-header { background-image: url("images/header.jpeg") ; -webkit-background-size: cover; /* For WebKit*/ -moz-background-size: cover; /* Mozilla*/ -o-background-size: cover; /* Opera*/ background-size: cover; height: 300px; width: 100%; } And my HTML <header> <nav class="navbar navbar-default"> <div class="container-fluid"> <!-- Brand

change background image jquery

不羁的心 提交于 2019-12-12 03:56:51
问题 so im trying to rotate background image from a set of three images i have. I figured out a way to do this but something strage is going on here. From the example below you should get i= 0, 1 and 2 but still is reaching value 3!! and newBg[3] is undefined! so it stays 10 seconds SHOWING NOTHING you can find a working example here: http://www.goesenlinea.com/agus/ <!DOCTYPE html> <html lang="en"> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="css

How can I make a Tumblr background image only for one page?

扶醉桌前 提交于 2019-12-12 03:38:59
问题 I would like the first page on my Tumblr website to have a background image that fills the entire screen, but for that page only...the other pages will have a white background. Website Please help, I have been at this for a long time..no luck! 回答1: inside the body add a wrapper (around your header, content and footer) and give it an id. set the background image of this id (e.g #page1) to whatever you like, in your case the tumblr image. 回答2: So, the way I would do it is like this: Create a

Show an alternative image while another image loads

随声附和 提交于 2019-12-12 03:31:01
问题 I have a div with a background image like this: <div class="carousel-image" style="background: url(img/background.gif) no-repeat center center;"> </div> When I load my webpage, there's an annoying second of blank background while my large background.gif image loads. How can I go about having an alternative image that loads quickly and is replaced as soon as the background.gif image is ready to take its place? 回答1: You have two solutions. You can use lazy loading of your image. For this

Table too long for background image at different resolutions

末鹿安然 提交于 2019-12-12 03:26:08
问题 ALREADY SOLVED: Multiple backgrounds on top of each other (Normal, Streched, Normal) I am currently working on a website for a school project and I'm facing issues with different screen resolutions. My website looks good on my 15.6" laptop at normal resolution, but as soon as I start zooming out, the centered table element gets too long for the background image, since it has a fixed size and cannot strech with the table. My first thought was splitting the background image into 3 parts and

Javascript Changing Random Background Image Issue

和自甴很熟 提交于 2019-12-12 02:57:48
问题 I am on Rails 4, and finally got this javascript working. It changes randomly changes the background image every 10 seconds with a fadein fadeout effect. The only issue is every so often, an image will only load halfway... then it will start to flash and and get crazy. It will continue to erratically flash from picture to picture until i refresh the page. Does anyone know why this is happening? Maybe poorly written javascript? All of my pictures are located in public/assets. home.html.erb: