"/>
首页 \ 问答 \ 将HTML嵌入到HTML中的嵌入式SVG中?(Embedding HTML in embedded SVG in HTML?)

将HTML嵌入到HTML中的嵌入式SVG中?(Embedding HTML in embedded SVG in HTML?)

允许在HTML中嵌入SVG ...

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Hmmm....</title>
    </head>
    <body>
        <svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" width="500px" height="100%">
            <text>Hello cruel world!</text>
        </svg>
    </body>
</html>

......反之亦然:

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" width="500px" height="100%">
    <foreignObject x="0" y="0" width="100%" height="100%">
        <body xmlns="http://www.w3.org/1999/xhtml">
            <h1>Goodbye cruel world...</h1>
        </body>
    </foreignObject>
</svg>

规范 (23.2,第三段)(和我引用:)“如果你想在XHTML中的SVG中使用XHTML在SVG中嵌入SVG,那么没问题......”。 我想哇,那是深刻的! 并做到了这一点:

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Yeah!</title>
    </head>
    <body>
        <svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" width="500px" height="100%">
            <foreignObject x="0" y="0" width="100%" height="100%">
                <body class="svgbody" xmlns="http://www.w3.org/1999/xhtml">
                    <h1>And hello again!</h1>
                </body>
            </foreignObject>
        </svg>
    </body>
</html>

但所有浏览器都将body标签与HTML5 body标签合并(HTML5 body标签获得svgbody类)......这是小提琴全屏 ); 内联svg中没有body标签。

我不知道为什么,我希望你能帮助我! 可以通过将SVG放入不同的文件来解决,但我不想听到它。 为什么它不起作用?


It's allowed to embed SVG in HTML...

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Hmmm....</title>
    </head>
    <body>
        <svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" width="500px" height="100%">
            <text>Hello cruel world!</text>
        </svg>
    </body>
</html>

...and vice versa:

<svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" width="500px" height="100%">
    <foreignObject x="0" y="0" width="100%" height="100%">
        <body xmlns="http://www.w3.org/1999/xhtml">
            <h1>Goodbye cruel world...</h1>
        </body>
    </foreignObject>
</svg>

The specs say (23.2, third paragraph) (and I quote:) "If you want to embed SVG in XHTML in SVG in XHTML in SVG, it's okay...". I thought Wow, that's DEEP! and did this:

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Yeah!</title>
    </head>
    <body>
        <svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0" y="0" width="500px" height="100%">
            <foreignObject x="0" y="0" width="100%" height="100%">
                <body class="svgbody" xmlns="http://www.w3.org/1999/xhtml">
                    <h1>And hello again!</h1>
                </body>
            </foreignObject>
        </svg>
    </body>
</html>

But all browsers merge the body tag with the HTML5 body tag (the HTML5 body tag gets the svgbody class)... This is the fiddle (fullscreen); there's no body tag within the inline svg.

I don't know why, and I hope you can help me out! It might be solved by putting the SVG in a different file, but I don't want to hear about it. Why doesn't it work?


原文:https://stackoverflow.com/questions/10935757
更新时间:2022-03-17 08:03

最满意答案

你要先调用config再去编译啊:
make menuconfig后
选择 “Load an Alternate Configuration File”
输入刚刚你的内核配置文件名
选择 “Save an Alternate Configuration File”
输入 “.config”
保存退出
然后在进行编译即可。

其他回答

我知道是为是你错了,但是并不知道解决方法。原因是这样的,首先移动到arch所在的那个文件夹,就是第一层的那个文件夹,然后修改Makefile 其中有一项叫ARCH=arm,这个是系统默认的。表示你的编辑将基于arm处理器,你要把这个修改成x86,但是还要修改别的,这个我就不知道了,我也正在找
make menuconfig是菜单配置命令,就是自己选择配置哪些功能 .config是配置文件,完成配置后会在内核源代码根目录下产生该文件 makefile,相应文件夹下的makefile用于编译相应文件夹下的文件 kconfig暂时不知道
你好。。这个问题你解决了吗???现在我也碰到这个问题了。。我用的源码是友善之臂mini2440里提供的源码。。。我现在遇到的问题和你的一模一样。。。

相关问答

更多
  • 对于每一块主流的嵌入式芯片,都会有已经移植好的linux内核源代码,你需要购买某些开发板,他们都有配套内核源代码。编译内核的课程可以讲好几个小时,我无法简单回答。开发板都有配套视频教程,你必须看视频。内核这东西不需要追求最新版本。直接在官网下载的内核都需要修改 移植到你的开发板上才能运行 。
  • 编译内核的目的主要是改变内核的默认选项 编译内核就是让系统在这台机器上更稳定更安全! 建议你对Linux已经相当熟悉以后再去尝试内核编译!(需要一定的编程基础)
  • 编译过程会有提示的。如果没有错误输出,那就是编译过程没错误。 但编译过程无错不代表可以用,还要实际启动测试才行。
  • 看你怎么编译的,如果a和b硬件系统不一样,肯定要重新编译
  • 学嵌入式就要不但要学其然,还要学其所以然~ (1)你的步骤很不规范,而且没有明白各步骤都做了什么。 (2)编译内核的过程如下: A. 如果你原来就有配置文件,比如你的S3C_2410_defconfig,你需要执行的是 make S3C_2410_defconfig ARCH=ARM(这样他做的就是将arch/arm/configs中的 s3c2410_defconfig复制到源码根目录下为.config文件,如果你指定ARCH=x86那么 它就会从arch/x86目录下找配置文件。(这里涉及到一个规范问题 ...
  • 随便就行,/usr/src/linux 放当前运行中的内核源代码的习惯你可以遵守,也可以不遵守。 只不过是一些软件在编译时会固定到这里找内核源代码的相关数据来保证自己的内核模块可以正确编译。不过有些时候 /usr/module 里面的内核目录里面也有到你的源代码目录的链接。很多软件两个地方找到一个就能继续编译。 反正你安装内核后,最好不要再动这个内核源代码的位置就行了。其实需要内核源代码的软件也没几个。除了 udev ,我也就只能想起还有显卡驱动了。另外你如果用了虚拟机软件,那就还有虚拟机软件运行时需要的内 ...
  • 学嵌入式就要不但要学其然,还要学其所以然~ (1)你的步骤很不规范,而且没有明白各步骤都做了什么。 (2)编译内核的过程如下: A. 如果你原来就有配置文件,比如你的S3C_2410_defconfig,你需要执行的是 make S3C_2410_defconfig ARCH=ARM(这样他做的就是将arch/arm/configs中的 s3c2410_defconfig复制到源码根目录下为.config文件,如果你指定ARCH=x86那么 它就会从arch/x86目录下找配置文件。(这里涉及到一 ...
  • 一、Linux内核的配置系统由三个部分组成,分别是: 1、Makefile:分布在 Linux 内核源代码根目录及各层目录中,定义 Linux 内核的编译规则; 2、配置文件(config.in(2.4内核,2.6内核)):给用户提供配置选择的功能; 3、配置工具:包括配置命令解释器(对配置脚本中使用的配置命令进行解释)和配置用户界面(提供基于字符界面、基于 Ncurses 图形界面以及基于 Xwindows 图形界面的用户配置界面,各自对应于 Make config、Make menuconfig 和 m ...
  • 产生静态库:使用ar来将几个.o文件打包成.a文件使用静态库:链接参数使用-static
  • 你要先调用config再去编译啊: make menuconfig后 选择 “Load an Alternate Configuration File” 输入刚刚你的内核配置文件名 选择 “Save an Alternate Configuration File” 输入 “.config” 保存退出 然后在进行编译即可。

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)