background-position

background-position question

时光怂恿深爱的人放手 提交于 2019-12-11 05:05:15
问题 On this page I"ve been working on forever, I have this column headed "Bid x Ask": http://www.sellmycalls.com/so-bg-pos.png in each of whose cell backgrounds there is supposed to be a bar chart that conveys the ratio of the numbers in the cell to each other. So in each cell I have a background-color: gray; and a background-image:all-white;. I can't properly position the (plenty big enough) image on the gray background. In fact, in its current incarnation, the image doesn't show up at all. How

Toggling background position on click

女生的网名这么多〃 提交于 2019-12-11 01:56:44
问题 I am trying to achieve this Is there an easy way to toggle background position between two states on click event? I have constructed a function that should work.. haven't got a clue why it won't. I have spent a number of hours trying to achieve this for such a tedious part of my project, but it's necessary. Please take a look at this function: $("#secondarrow").click(function(){ /*$(".arrows").toggle( function(){ $(this).css({"background-position":"0px 0px"}); }, function(){ $(this).css({

jQuery Animate backgroundPosition not working

跟風遠走 提交于 2019-12-10 22:48:18
问题 I'm attempting to animate background position of some divs followed by a callback animation that does the same. What am I missing here? HTML: <div> <div class='divimg'></div> <div class='divimg'></div> <div class='divimg'></div> </div> ​ CSS: .divimg { width:250px; height:250px; margin:20px; float:left; background-size: 500px 500px; background-position: top center; background-repeat: no repeat; background-image: url(http://lorempixel.com/186/116/nature/1); }​ JavaScript: $(function() {

background-size with background-position doesn't scale the position?

假如想象 提交于 2019-12-09 04:39:32
问题 I've a sprite of 62 images of 91 * 91px, which makes the whole thing 91 * 5642 px. They're displayed in sort of a dynamic grid that grows and shrinks depending on user/pointer movement. Sometimes an element (std 91 * 91 px) zooms in to make it 120 * 120 px. Obviously I want the background to grow with so that the entire 91 * 91 px image is shown in the entire 120 * 120 element. Enter background-size: 100% auto to make the width always perfect. Problem now is that background-position expects

CSS background-position

落爺英雄遲暮 提交于 2019-12-08 19:07:27
问题 Little question here, i have a sprite image that contain icons with normal and hover effects.. And this is the css i have for now.. .wi{ background-image:url(images/icons/small/wi.png); background-repeat:no-repeat; display:block; overflow:hidden; height:24px; width:24px; } .wi-delete{background-position:0 0;} .wi-edit{background-position:-24px 0;} .wi-fullscreen{background-position:-48px 0;} .wi-imageedit{background-position:-72px 0;} .wi-download{background-position:-96px 0;} .wi-tags

How do I repeat part of an image using background-position and CSS sprites?

主宰稳场 提交于 2019-12-08 01:42:52
问题 I would like to create some buttons with dynamic width using CSS sprites and background-position but I'm not sure if what I want is possible.. I would like the button to have a left-side, middle, and right-side, with the middle repeating as required. Ideally I would like this to be made up of one image of 11px wide so the left and right sides are both 5px wide and the middle is 1px repeated. Is there some way I can define in CSS to use the one centre pixel of the image and repeat if for the

jquery background change one axis only

谁说胖子不能爱 提交于 2019-12-07 03:27:35
问题 I think my last question overwhelmed everybody so I will simplify I am attempting to change the background-position of the x-axis only. By default if only one value is defined, the other defaults to 50% , so this function: function colorChangePiano() { var bp = $("background-position").css; $("#target").css('background-position', (bp == -1131) ? '-377' : '0'); } returns background-position: 0 50% ; How can I modify the function to change x-axis but leave y-axis unchanged? edited --> this is

How do I repeat part of an image using background-position and CSS sprites?

只愿长相守 提交于 2019-12-06 10:39:08
I would like to create some buttons with dynamic width using CSS sprites and background-position but I'm not sure if what I want is possible.. I would like the button to have a left-side, middle, and right-side, with the middle repeating as required. Ideally I would like this to be made up of one image of 11px wide so the left and right sides are both 5px wide and the middle is 1px repeated. Is there some way I can define in CSS to use the one centre pixel of the image and repeat if for the required (unknown) width? Normally I've used two images to achieve similar results - one for the sides

jquery background change one axis only

*爱你&永不变心* 提交于 2019-12-05 06:55:02
I think my last question overwhelmed everybody so I will simplify I am attempting to change the background-position of the x-axis only. By default if only one value is defined, the other defaults to 50% , so this function: function colorChangePiano() { var bp = $("background-position").css; $("#target").css('background-position', (bp == -1131) ? '-377' : '0'); } returns background-position: 0 50% ; How can I modify the function to change x-axis but leave y-axis unchanged? edited --> this is for a sprite with 4 columns and 4 rows so the y-axis should remain dynamic. working site here: http:/

CSS background-position animate right to left

感情迁移 提交于 2019-12-04 18:53:14
问题 I'm trying to animate a background-image, so that the image appears from right to left. I have used an image which has a greater width than the div-container, where the background is located. On start, the backgrond is the following background: url(../img/zeppelin.png); background-repeat: no-repeat; background-position: right; but when the page is loaded, I want the background to be animated, so that it is positioned left. This should take a eg. 2 seconds and only should be done one time.