Search Results

Search found 11621 results on 465 pages for 'html5 video'.

Page 145/465 | < Previous Page | 141 142 143 144 145 146 147 148 149 150 151 152  | Next Page >

  • Rotating png images using css in IE

    - by Ernest Shulikovski
    Here is a mockup for something called "Diversity Disc": http://diversity.iest.pl/ It is just three disks that you can rotate and read "results". I am using there just four png images, and rotate using jQuery f.i: $.fn.rleft = function() { return this.animate({ rotate: '-=45deg' }); }; It works not so bad in most new browser. But in all versions of IE things go terribly wrong. There is problem with rotation, and with png: after rotation, there is happening something very ugly with alpha transparency of those images. So my question is, is this possible to make it work in IE 8 and 7 (and, more or less IE 6?). If no I will be forced to order it in Flash. But I would like first to try to do it using just css and javascript (svg?). So what I am doing wrong? Do you have any tips, for using different technology, or js library? Thank you in advance for any answers.

    Read the article

  • Working with Multiple Layers - KineticJS

    - by Bruno Sampaio
    I'm using KineticJS 4.0.5 and I'm currently trying to draw the contents of several layers but only the last one added to stage is drawn... If I understood the documentation correctly this should be possible, otherwise why would we need a layer? I have three different layers: a background layer with just a Kinectic.Rect object; a elements layer with several types of shapes; and a top layer with elements I want to be always on top of everything. I populate those layers inside a draw function I have inside a object I created, this object also has a shape attribute which refers to the background and a contents attribute with the elements to add to the elements layer. My code for the draw function is the following: this.draw = function() { var stage = E.game.stage, layers = E.game.layers; stage.clear(); // Add Background this.shape.setSize(stage.getWidth(), stage.getHeight()); layers.background.add(this.shape); // Iterate over contents for(var i = 0; i < this.contents.length; i++) { layers.elements.add(this.contents[i].shape); } // Draw Everything stage.add(layers.background); stage.add(layers.elements); stage.add(layers.top); // This one is currently empty stage.draw(); } After running this function, only layers.top is drawn in the canvas, and if I comment the line where it is added only layers.elements is drawn. However the stage has 3 childrens (I checked it with inspect element on chrome) and in the documentation it says the draw function draws all layers... Am I doing something wrong here? Or it isn't possible? And if it's not possible why would I need a layer and a stage? Wouldn't one be enough? Thank you in advance. Edit: I was able to solve the problem, I was applying a white background color with css to the canvas element and since each layer creates a new canvas element above the others I could only see the contents for the top most layer (in this case just white). However, I still have a problem related with multiple layers that I didn't have before with just one layer. When I use the clear function on the stage it should clear the layers right? But instead the layers remain exactly the same, even if I try to call clear on each individual layer they won't change... I'm also using the stage draw function after clearing them but still no changes at all... The only solution I found until now was by removing the layer from the stage and adding it again :s Is there a better way to reset the layers contents? Thank you again and sorry for the confusion with the first question.

    Read the article

  • JavaScript onClick() Display

    - by junaidkaps
    I have an array consisting of several objects containing Strings. I am successfully able to display the array by using: <td><p onclick="theMiddle(this)">The Middle</td> As you see from the td tag this is part of a table. Issue is that the browser opens up a new page to display my text. I have been trying to display the array above my table in a p tag. //JavaScript var arrayTheMiddle = new Array (showName.theMiddle, beginingTime.theMiddle, network.abc, duration.thirty, rating.general, description.theMiddle, showImage.theMiddle); function theMiddle(obj){ for(i=0; i < arrayTheMiddle.length; i++) { document.write(arrayTheMiddle[i] + "<br>"); } } //HTML File <p>Would like the array/function displayed here while the user clicks within the table below (entire table has not been listed)</p> <td><p onclick="theMiddle(this)">The Middle</td> Unfortunately I am constantly failing at utilizing get element by id to call my function which consists of an array. I have searched for all sorts of stuff, yet frankly I'm lost. Not even sure if my approach is correct at this point. I'm sure this is one of those simple things that are blowing over my head!

    Read the article

  • Canvas is stretch when using CSS but normal with old "width" and "height" properties

    - by Sirber
    I have 2 canvas, one use old html "width" and "height" to size it, the other use CSS <canvas id="compteur1" width="300" height="300" onmousedown="compteurClick(this.id);"></canvas> <canvas id="compteur2" style="width: 300px; height: 300px;" onmousedown="compteurClick(this.id);"></canvas> compteur1 display like it should, but not compteur2. the content is drawn using javascript on a 300x300 canvas. why is there a display difference? Thanks! Screenshot:

    Read the article

  • how to get the css keys and values for any html tag

    - by artsince
    I would like to dump all css key/value pairs for an html tag. In particular, I would like to learn the css properties for <audio> tag, so I can try to customize the look. document.getElementById('myaudio').style returns a CSSStyleDeclaration object but length returns 0 and I cannot figure out to iterate over the key/value pairs. Thank you

    Read the article

  • Max size of localStorage values?

    - by user269386
    Hi, since the localStorage (currently) only supports strings as values and in order to that the objects have to be stringified (stored as JSON-string), before they can be stored, i wondered if there is a defined limitation regarding the length of the values. Does anyone know if there is a definition which applies to all browsers, respectively does anyone know the limitations for Chrome5? Thanks, in advance, for your help

    Read the article

  • Getting location via a web application being run in a WebView

    - by synic
    m.google.com somehow requests the current location when loaded in Android's browser. I want to do the same thing from a web page being loaded into a WebView in my own application. Is the only way to go about this with WebView.addJavascriptInterface(), or is there already a javascript interface available for webapps to use?

    Read the article

  • Dash surrounding text

    - by Brandon Hansen
    Given the above dynamically generated text (meaning that I can't just use an image), I am trying to recreate the design using just html and css selectors. I would like to just use a single h4 with the containing text, but am open to other solutions. I would prefer to not use absolute positioning, but again, if that is the only way, then so be it. I have tried surrounding with span tags, but those are inline elements that don't have an inherent width. The h4 will be nested within a div, though not always of the same class or id. Any ideas or resources to get me started?

    Read the article

  • CSS Ease-in-out to full screen

    - by Aditya Singh
    I have a black background div of a size which contains an image. <div id="Banner"> <img onclick="expand();" src="hola.jpg"> </div> #Banner { position:relative; height:50px; width:50px; margin:0 auto; background-color:#000000; -webkit-transition: all 0.5s ease-in-out 0.5s; -moz-transition: all 0.5s ease-in-out 0.5s; -o-transition: all 0.5s ease-in-out 0.5s; transition: all 0.5s ease-in-out 0.5s; } <script type="text/javascript"> function expand(){ document.getElementById('Banner').style['height'] = '250'; document.getElementById('Banner').style['width'] = '250'; } </script> So when the user clicks on the image, the div transitions to 250, 250. My problem is that, i want it to to transition to full screen. The following javascript function does expand to fullscreen but the transition effect doesn't come. I need to do it from a javascript code without jquery. function expand(){ document.getElementById('Banner').style['position'] = 'absolute'; document.getElementById('Banner').style['height'] = '100%'; document.getElementById('Banner').style['width'] = '100%'; document.getElementById('Banner').style['top'] = '0'; document.getElementById('Banner').style['left'] = '0'; } Please advice. Update : Solution Roger below has provided with an alternative solution. This takes care if the document has already been scrolled and is another place. Will expand the div to full browser screen. sz=getSize(); //function returns screen width and height in pixels currentWidth=200; currentHeight=200; scalex=sz.W/currentWidth; scaley=sz.H/currentHeight; transx=0-((expandingDiv.offsetLeft+(currentWidth/2))-(sz.W/2))+document.body.scrollLeft; transy=0-((expandingDiv.offsetTop+(cuttentHeight/2))-(sz.H/2))+document.body.scrollTop; transx = transx.toString(); transy = transy.toString(); document.getElementById("Banner").style['-webkit-transform'] = 'translate('+transx+'px,'+transy+'px) scale('+scalex+','+scaley+')';

    Read the article

  • How to access nested iframes?

    - by Debugger
    I need to send post message to iframe. currently its working if i have single iframe inside parent page.But I want to make it work for nested iframes. Criterias are : I can just add listener code in last leaf iframe. Do not know length of iframe nesting. Need both way communication , from parent to child also by leaf iframe to parent. I am sick of third part iframes , please suggest me some appropriate solution.

    Read the article

  • Are all <canvas> tag dimensions in pixels?

    - by Simon Omega
    Are all tag dimensions in pixels? I am asking because I understood them to be. But my math is broken or I am just not grasping something here. I have been doing python mostly and just jumped back into Java Scripting. If I am just doing something stupid let me know. For a game I am writing, I wanted to have a blocky gradient. I have the following: HTML <canvas id="heir"></canvas> CSS @media screen { body { font-size: 12pt } /* Game Rendering Space */ canvas { width: 640px; height: 480px; border-style: solid; border-width: 1px; } } JavaScript (Shortened) function testDraw ( thecontext ) { var myblue = 255; thecontext.save(); // Save All Settings (Before this Function was called) for (var i = 0; i < 480; i = i + 10 ) { if (myblue.toString(16).length == 1) { thecontext.fillStyle = "#00000" + myblue.toString(16); } else { thecontext.fillStyle = "#0000" + myblue.toString(16); } thecontext.fillRect(0, i, 640, 10); myblue = myblue - 2; }; thecontext.restore(); // Restore Settings to Save Point (Removing Styles, etc...) } function main () { var targetcontext = document.getElementById(“main”).getContext("2d"); testDraw(targetcontext); } To me this should produce a series of 640w by 10h pixel bars. In Google Chrome and Fire Fox I get 15 bars. To me that means ( 480 / 15 ) is 32 pixel high bars. So I change the code to: function testDraw ( thecontext ) { var myblue = 255; thecontext.save(); // Save All Settings (Before this Function was called) for (var i = 0; i < 16; i++ ) { if (myblue.toString(16).length == 1) { thecontext.fillStyle = "#00000" + myblue.toString(16); } else { thecontext.fillStyle = "#0000" + myblue.toString(16); } thecontext.fillRect(0, (i * 10), 640, 10); myblue = myblue - 10; }; thecontext.restore(); // Restore Settings to Save Point (Removing Styles, etc...) } And get a true 32 pixel height result for comparison. Other than the fact that the first code snippet has shades of blue rendering in non-visible portions of the they are measuring 32 pixels. Now back to the Original Java Code... If I inspect the tag in Chrome it reports 640 x 480. If I inspect it in Fire Fox it reports 640 x 480. BUT! Fire Fox exports the original code to png at 300 x 150 (which is 15 rows of 10). Is it some how being resized to 640 x 480 by the CSS instead of being set to a true 640 x 480? Why, how, what? O_o I confused...

    Read the article

  • HTML Canvas and saving the data on the server

    - by snitko
    Say I've written a simple app that draws circles in browser. Now I'd like to let people save their pictures. How would I store the data on the server? Which format would be the best option? Should I simply store the relevant html? What would be the case when I would want to make a custom format that is stored on the server and parsed back to html canvas when loaded?

    Read the article

  • Click events not working in Rails view

    - by Fdr
    I have following view (html.erb): <h3>My view</h3> <script> function test() { alert("hello"); } </script> <input type="button" onClick="test();" value="test" /> For reasons I cannot understand the onClick event never gets fired when I access the view through rails(tried static apache hosting - no problems there). Here is rendered html: http://pastebin.com/LmGysgUG I feel quite stupid, is this something to do the way Rails renders views?

    Read the article

  • CSS to create curved corner between two elements?

    - by Tauren
    My UI has an unordered list on the left. When a list item is selected, a div appears on the right of it. I'd like to have a curved outer corner where the <li> and the <div> meet. See the white arrow in the image below. To extend the blue <li> to the edge of the <ul>, I'm planning to do something like this: li { right-margin: 2em; border-radius: 8px; } li.active { right-margin: 0; border-bottom-right-radius: 0; border-top-right-radius: 0; } Is there a better way to extend the <li> to the edge of the <ul>? Obviously, I'll include the webkit and mozilla border radius CSS as well. The main thing I'm unsure about is that outer corner underneath the bottom right corner of the active <li>. I have some ideas, but they seem like hacks. Any suggestions? NOTE that the <ul> is indicated in grey, but it would be white in the real design. Also, I'm planning to use Javascript to position the <div> correctly when an <li> is selected.

    Read the article

  • Firefox 15.0 ignores meta charset="uft-8"

    - by flapjack
    I have this simple html <!Doctype html> <head> <title>Uft-8</title> <meta charset="uft-8"> <style type="text/css"> .tr_deco{ background-color:pink; border:1px solid red; } </style> </head> <body> <a class="new_krud_slider" href="">make new</a> </body> </html> When i try out the code on firefox 15,i get this firebug error. An unsupported character encoding was declared for the HTML document using a meta tag. The declaration was ignored. My firebug version is 1.7.3. What could be causing this error?.

    Read the article

  • How to store and access JSON data for a site?

    - by Callmeed
    I'm buiding an HTML/jQuery site where almost all the content comes from remote JSON data. I'm having trouble coming up with a good way to store and access the data in the future (scope-wise). Currently, I've written a jQuery plugin that gets the JSONP data when the site loads. But I have other functions and jQuery plugins that need to access this data. Where should this data be stored so other functions and plugins can access it? Should it be a global variable? If it matters, this site will only run on the iPad and the back-end of the site is in Rails.

    Read the article

  • CSS - image overflow tricks

    - by rnk
    I'm stucking with some design techniques where I want to make image item box like this Where the actual image can be upto maximum height of 300px and width of 225px. The width and height of the item box including the image and the text is 190px x 190px I'm using this image http://farm8.staticflickr.com/7122/7424355198_72620895bd_m.jpg I tried using overflow: hidden for the image item to hide it's height below to show the image text. But I'm getting only like this http://jsfiddle.net/Dkh4q/ Could anyone tell the mistake I've done? Thanks! UPDATE For more information about the expected result, if you can login to zerply, then please check this http://zerply.com/christievdc/portfolio for example.

    Read the article

  • Eror while showing returned value on parent window from chield (Dialog box) window using JSF Trinida

    - by Navnath
    Hi There, I am using Myfaces and Trinidad tld's for page design. In that, I am trying to implement Dialog box which will going to open on button click with tacking some value from parent window and return result to Parent window. Now the problem is I can send value to Dialog box and also get return from dialog box successfully, but there is problem to show return value on Parent window because parent window is not reflecting that value and ask for refresh page. When I refresh page, it again open the pop up, i.e. it resending the previous request. Here is my return code. private UIXInput input; public UIXInput getInput() { return input; } public void setInput(UIXInput input) { this.input = input; } public void returned(ReturnEvent event) { if (event.getReturnValue() != null) { getInput().setValue(event.getReturnValue()); RequestContext afContext = RequestContext.getCurrentInstance(); afContext.addPartialTarget(getInput()); } } Next is I have bind input variable with field which need to reflect return value. Here is .jspx code. I have download Trinidad dialog code and try to run on local system, but it not showing any dialog box. But once I remove partialSubmit="true" attribute from comment button which shows dialog box, Then I can see dialog box. Is this attribute making an above error? I hope I have explain my problem clearly. Please...Please let me know any any kind of solution, suggestion. I have spend almost a week to resolve this issue, but.......didn't succeed. Thank You in advance, Navnath Kumbhar.

    Read the article

  • How to align item to the very bottom within flexible box layout column?

    - by Christina Lacey
    So far I have the three columns laid out in a vertical box (can't post images yet so here's a link): http://imgur.com/4Y34c <div id="vbox"> <div id="blck1"></div> <div id="blck2"></div> <div id="blck3"><div id="yellow"></div><div id="blue"></div></div> </div> css #vbox{ display: box; box-orient: vertical; } #vbox > div { box-flex: 1; } The problem is that I don't know how to get the blue box to align to the bottom of the third column.. I tried all the alignment properties, i must be doing something wrong. Any ideas???

    Read the article

  • Once an HTML document has a manifest (cache.manifest), how can you remove it?

    - by Michael F
    It seems that once you have a manifest entry, a la: <html manifest="cache.manifest"> Then that page (the master entry in the cache) will always be cached (at least by Safari) until the user does something to remove the cache, even if you later remove the manifest attribute from the html tag and update the manifest (by changing something within it), forcing the master entry to be reloaded along with everything else. In other words, if you have: index.html (with manifest defined) file1.js (referenced in manifest) file2.js (referenced in manifest) cache.manifest (lists the two js files) -- removing the manifest entry from index.html and modifying the manifest (so it gets expired by the browser and all content reloaded) will not stop this page from behaving as if it's still fully cached. If you view source on index.html you won't see the manifest listed anymore, but the browser will still request only the cache.manifest file, and unless that file's content is changed, no other changes to any files will be shown to the user. It seems like a pretty glaring bug, and it's present on iOS as well as Mac versions of Safari. Has anyone found a way of resetting the page and getting rid of the cache without requiring user intervention?

    Read the article

  • Html + Css: How to create a auto-resizing rotated background?

    - by Sebastian P.R. Gingter
    Hi, image a complete black web page. On this web page is a 100% size white div that fills the whole page. I'd like to rotate this div by -7 degrees (or 7 degrees counter-clock wise). This will result in the black background being visible in triangles on the edges, just like you had placed a piece of paper on a desk and turned it a bit to the left. Actually this can be done with some css and it's working quite well (except for IE). The real problem now is: I'd like to have a normal, non-rotated div element on top of that to display the content in, so that only the background is rotated. Rotating a contained div counterwise doesn't work though, because through the two transformations the text will be blurry in all browsers. How can I realize that? Best would be a solution workiing in current Webkit browsers, FF3.5+ and IE7+. If only IE8+ I could live with that too.

    Read the article

< Previous Page | 141 142 143 144 145 146 147 148 149 150 151 152  | Next Page >