media

@import in @media not working in Firefox 3.0.3

守給你的承諾、 提交于 2019-12-21 17:03:53
问题 This is what I have, which works in IE7, but not in Firefox: @media screen { @import 'screen.css'; } It works outside of the @media block in Firefox: @import 'screen.css'; UPDATE: This works: @media screen { .yui-d3f { border: 1px solid #999; height: 250px; } } What am I missing? 回答1: Firefox is following the CSS2 specification, while IE is playing fast and loose, as it were. The exact reason is that @import directives must be the first directives after the optional @charset directive. They

What does media=“screen” mean in css?

若如初见. 提交于 2019-12-21 12:07:23
问题 What does media="screen" mean in the below css code? <style type="text/css" media="screen"> 回答1: The goal of the media attribute is to allow you to specify different styles for different methods of display. Most commonly I use this to have 2 sets of styles, 1 for display (screen) and 1 for printing (print) Normally on the "print" css I'll do things like hide buttons, strip out extraneous images, ads, etc etc. Basically, make it 8.5x11 friendly. 回答2: There are two types, screen is the default

django staticfiles at url root

▼魔方 西西 提交于 2019-12-21 09:35:31
问题 I have a general question about the new Django 1.3 static file framework. I really like the new Django staticfile functionality introduced in Django 1.3. Normally, I set STATIC_URL="/static/" and enter the {{ STATIC_URL }} template tag into my templates. It's great how the development server automatically serves up the static files and all of my content is served up as expected. The {{ STATIC_URL }} would be substituted in the template and might serve up files like this... example.com/static

How can I print an image in a web page, fitting the paper size (A3, A4, A5, etc)?

南笙酒味 提交于 2019-12-21 09:16:36
问题 I am currently using IE9 and media queries and I have no need to have this working from other browsers. I tried using a set of rules like: @page { size: auto; margin: 10mm 10mm 10mm 10mm; } //... rules to match the millimiters of all the A formats (A0, A1, A2, etc) including margins and tolerance /* A4 210x297 mm */ @media print and (min-height: 266mm) and (max-height: 288mm) and (min-width: 179mm) and (max-width: 201mm) { .img_port { height: 267mm !important; } } // ... it seems to be

Android - Image Picker, Wrong Image

独自空忆成欢 提交于 2019-12-21 07:30:29
问题 I am starting a request for an image pick: Intent intent = new Intent(); intent.setType( "image/*" ); intent.setAction( Intent.ACTION_GET_CONTENT ); startActivityForResult( Intent.createChooser( intent, "Choose"), PHOTO_GALLERY ); And getting the data back out in onActivityResult : if( resultCode == Activity.RESULT_OK && requestCode == PHOTO_GALLERY ) { U.log( data.getData() ); Bitmap bm = ... // built from the getData() Uri this.postImagePreview.setImageBitmap( bm ); } When I launch the

Play sound in react-js

本秂侑毒 提交于 2019-12-21 06:23:56
问题 I try to play a sound on react-js but I can't make it start. I have my sound var initialised in my reactClass, before get InitialState: var App = React.createClass({ audio: new Audio('files/audio.mp3'), getInitialState: function () { return { playSound: false, ........ } } And this are the functions that I have for start and stop: playSound: function() { if(!this.state.playSound){ this.setState({ playSound: true, }, function(){ console.log("play sound 1"); this.audio.play(); console.log("play

Android closing media service on incoming call

限于喜欢 提交于 2019-12-21 06:06:16
问题 I'm really new on android and java. I'm making an app and it has a media service and I want the media to be stopped or paused on incoming calls. This is my media service code public class ServiceMusic extends Service { MediaPlayer music; @Override public IBinder onBind(Intent arg0) { return null; } @Override public void onDestroy() { super.onDestroy(); music.stop(); music.release(); } @Override public void onStart(Intent intent, int startId) { super.onStart(intent, startId); if (music !=null)

Understanding Retina device CSS Media queries

心已入冬 提交于 2019-12-21 05:35:20
问题 I am working on a WordPress theme and am trying to incorporate retina enabled CSS queries into my CSS file. I would just like to clarify that I have the media queries set up correctly before I change out all my background images. I have doubled the size of all my background images and perfixed them with the "@2x" naming convention. e.g icon-user@2x.png . I have added a jQuery function into my code to swap out the images with the CSS class of hires . In my CSS document I have a normal CSS

Best way to enumerate all available video codecs on Windows?

倖福魔咒の 提交于 2019-12-20 14:36:49
问题 I'm looking for a good way to enumerate all the Video codecs on a Windows XP/Vista machine. I need present the user with a set of video codecs, including the compressors and decompressors. The output would look something like Available Decoders DiVX Version 6.0 XVID Motion JPEG CompanyX's MPEG-2 Decoder Windows Media Video **Available Encoders** DiVX Version 6.0 Windows Media Video The problem that I am running into is that there is no reliable way to to capture all of the decoders available

Android Media Codec video decoding

时光总嘲笑我的痴心妄想 提交于 2019-12-20 10:24:17
问题 This is my first question so please let me know if I missed anything! Using Android API 16's new Media Codec implementation to try and decode a video so that I can send frames to be applied as a texture (the texture part is already done). So I have come up with the following code with some help off stack but in runOutputBuffer() my outputBufIndex is coming back -1 (or in an infinite loop as I have provided -1 as a timeout) can anyone help with this, and/or provide any advice on where to go