Home Web Front-end H5 Tutorial SVG基础|SVG SWITCH 元

SVG基础|SVG SWITCH 元

May 17, 2016 am 09:07 AM
h

1.jpg

  SVG 元素是用来做什么的呢?元素也是用来绘制文字的,那么它和元素有何不同呢?switch在很多编程语言中都有这个关键字,它是分支的意思,在SVG中,可以使用元素来匹配不同的语言,在不同的浏览器语言环境中显示不同的SVG文字。

  典型的用法是用于显示不同的文字,但是你不可以用它来显示不同的图形。看下面的简单例子:

  1.   
  2.       
  3.           UK English
  4.       

  5.       
  6.           English
  7.       

  8.       
  9.           Spanish
  10.       

  11.       
  12.           中文
  13.       

  14.   

  15.      
复制代码

  如果你的浏览器是中文环境的,那么上面的代码会显示“中文”两个字,如果是英文环境的,就会看到“English”。看看下面的返回结果,你看到了什么:
2.jpg
  这个属性的浏览器兼容性如下:
  •   Chrome 1.0+
  •   Firefox (Gecko) 1.8+
  •   Internet Explorer 9.0+
  •   Opera 8.0+
  •   Safari 3.0.4+
  •   Android 3.0+
  •   Firefox Mobile (Gecko) 1.8+
  •   Safari Mobile 3.0.4+
  •   IE Mobile 不支持

  本文版权属于jQuery之家,转载请注明出处:http://www.htmleaf.com/ziliaoku/ ... g/201506112011.html

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How uniapp achieves rapid conversion between mini programs and H5 How uniapp achieves rapid conversion between mini programs and H5 Oct 20, 2023 pm 02:12 PM

How uniapp can achieve rapid conversion between mini programs and H5 requires specific code examples. In recent years, with the development of the mobile Internet and the popularity of smartphones, mini programs and H5 have become indispensable application forms. As a cross-platform development framework, uniapp can quickly realize the conversion between small programs and H5 based on a set of codes, greatly improving development efficiency. This article will introduce how uniapp can achieve rapid conversion between mini programs and H5, and give specific code examples. 1. Introduction to uniapp unia

Which version is more stable: win1121h2 or 22h2? Which version is more stable: win1121h2 or 22h2? Jan 04, 2024 am 08:53 AM

Comparing the two versions of win1121h2 and 22h2, the latter 22h2 is more stable, and 22h2 has more functions. Compared with the previous 21h2, many functions have been improved. Let’s take a look. Which one is more stable, win1121h2 or 22h2: Answer: 22h2 is more stable. Comparing win1121h2 and 22h2, 22h2 is more stable. 22h2 adds a lot of features, and the problems of 21h2 have also been improved in 22h2. 22h2 update feature: Applications folder in start menu. Adjustable fixed area in the Start menu. Drag and drop on the taskbar. Focus Assist is integrated with the Notification Center. New "Spotlight" wallpaper feature. new

Which one is better between win101909 and 21h2? Which one is better between win101909 and 21h2? Dec 26, 2023 pm 02:01 PM

Windows 101909 is currently considered one of the most stable and reliable versions. However, unfortunately, service support for this version has ended recently. 21H2 is a relatively stable version. In fact, from the actual situation, both are very good choices. Which one is better, win101909 or 21h2? Answer: 1909 is more stable, and 21h2 will be more secure. In the current environment, 1909 is still generally regarded as one of the most stable and reliable versions. However, the Win101909 version has officially stopped serving on May 11, 2021. WindowsServer21h2 is committed to providing more professional IT function support to the majority of users. 1. After actual testing by many users,

Which is the better choice: win1123h2 or 22h2? Which is the better choice: win1123h2 or 22h2? Dec 28, 2023 pm 03:09 PM

The 23h2 version and the 22h2 version in the Windows 11 system will be released in 2023 and 2022 respectively. Generally speaking, system updates are getting better and better. The editor also believes that the 23h2 version is better than the 22h2 version. Which one is better, win1123h2 or 22h2? Answer: win1123h2 is better. According to reports, win1123h2 is a cumulative version update from 22h2 to the next version, and they are all the same platform. This means that there are no compatibility issues between the two versions. It is recommended that you update them in time. The win1123h2 version brings us many practical features, such as the never-merge mode for taskbar window applications. There are more

Solve the problem of not getting Win11 23H2 update Solve the problem of not getting Win11 23H2 update Jan 14, 2024 pm 09:24 PM

Everyone wants to update the 23H2 version of Win11 recently, but a small number of users have not received the update push message yet. It may be that a process in the background update progress is stuck, and it will be fine after a while. What to do if the Win11 update fails to get 23H2. Method 1: Wait patiently. If the user checks the update status of the computer and finds that it is stuck, we can wait for a while and the system will continue to update. Method 2: Clear the updated cache. If the user has updated the system before and has not cleared the more detailed cache, it will affect the normal update of 23h2. You can manually clear it. Method three: Use image installation. It is recommended that you go to Microsoft's official website to download the image file of win1123h2, and then update the file.

How to update Win101909 to 20H2 How to update Win101909 to 20H2 Jan 05, 2024 pm 09:53 PM

Now the win101909 version has stopped updating, so many users want to update their system version but don't know how to do it. Users only need to enter the computer settings to find the corresponding upgrade. How to update win101909 to 20h21. Click the Computer Start button, then click "Settings" 2. Then click "Update and Security" 3. Find Check for Updates here 4. Then find the corresponding version and click Download and Install, then wait for the computer to update itself That's it.

Win11 22H2 fixes taskbar failure and restores taskbar drag and drop function Win11 22H2 fixes taskbar failure and restores taskbar drag and drop function Dec 24, 2023 am 11:05 AM

The taskbar is the cause of many problems in the Win11 system this time. Therefore, Microsoft is about to optimize and fix it this time. The following is a detailed Win11 taskbar fault that will be fixed in 22H2. The taskbar drag and drop function may return to the details. Come and learn together. Just give it a try. Win11 taskbar failure will be fixed in 22H2 and the taskbar drag and drop function may return: 1. There are many problems and bugs in the taskbar of win11 system that affect the use of many users. Fortunately, this time Microsoft will carry out relevant maintenance for the new system. Optimize and fix, and make the taskbar more reliable. 2. Before this, when the mouse stayed on the taskbar, pop-up windows would randomly appear in other locations. 3. Also, when the mouse stays on the icon in the corner of the taskbar, the speed is too fast.

The difference between win1121h2 and 22h2 The difference between win1121h2 and 22h2 Dec 28, 2023 pm 01:48 PM

win1121h2 and 22h2 are two installation packages for the win11 system. The latter has obvious optimizations compared to the former, and its compatibility is better. Let's take a look at the optimizations below. The differences between win1121h2 and 22h2: 1. Touch adds new folders in the start menu, drag-and-drop function on the taskbar, and new touch gestures with animations. 2. Real-time subtitles also adds the barrier-free function of real-time subtitles, which is indeed a good feature for some people who want to add subtitles. 3. Voice access We can also control the computer through voice. 4. The Task Manager has added a new dark mode and an improved layout. It can better improve efficiency, and the snap function is available in 22h

See all articles