Css27: base tags with the href attribute will invalidate the svg Element url in chrome. css27chrome

Source: Internet
Author: User

Css27: base tags with the href attribute will invalidate the svg Element url in chrome. css27chrome

A chrome problem, but the specific cause is unknown.

Trigger condition:When the href attribute in the base tag of chrome browser has a value

Trigger problem:If the elements in svg use filters and blur URLs, they will become invalid. This problem is not found in firefox and IE10.

Normal status:

The status in chrome when there is a base tag and the value in href is:

Test code:

<! Doctype html> 

 

The specific reason is unknown. I hope you can give me some advice.

 


Creating and adding new elements with js in svg is successful, but cannot be displayed (SVG development practices)

First, change node = svgdoc. createElementNS ('www .w3.org/2000/svg', 'rect ') at 1. It is required to create a svgRect element.
Second, IE8 does not support svg. When running this file in IE9 or later, dynamic content will be blocked. A prompt will be displayed at the bottom of the page. Click allow. Firefox and chrome can directly run this file.

SVG cannot display Chinese Characters

Young people. The function you use is File SVGOutputFile.
I think your SVG images are dynamically generated. Let me give you an example.
Let's take a look at your example.

Import java. lang. Math;
Import java. io. File;
Import java. io. FileWriter;
Import java. util. ArrayList;
Import java. util. List;
Import java. util. Random;
Public class generateontology {

Public static void main (String [] args ){
List list = new ArrayList ();
List. add ("Mathematics ");
List. add ("Chinese ");
List. add (" ");
String path = "F :\\";
RenderSVGGradientOnToLogy ("abc", list, path );

}
Public static void renderSVGGradientOnToLogy (String username, List list, String path ){

// Here is the hard-coded coordinate of the center, which can be modified,
Int CirCenterX = 500;
Int CirCenterY = 400;
Int r = 50; // radius of the circle
Int length = 100; // The length of the ray.
Int LineEndX = 0;
Int LineEndY = 0;
Int CirSecEndX = 0;
Int CirSecEndY = 0;
String NewDirectPage = "SVGSecInstance. jsp ";

Int ListAcount = list. size ();

// This is where we find out what the largest value contained in each of the array is,
// Its a simple loop that goes through each value passed, and determines the highest

Try {
// Get the SVG file ready for the drawing of the perfomance graph
File SVGOutputFile = new File (path, "SVGOnToLogy. svg ");
// File SVGOutputFile = new File ("SVGOnToLogyTest1.svg ");

FileWriter SVGout = new FileWrit ...... remaining full text>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.