这是css:"/>
首页 \ 问答 \ Firefox线性渐变问题(Firefox linear-gradient issue)

Firefox线性渐变问题(Firefox linear-gradient issue)

我有一个渐变div,这里是:

<div class="gradient"></div>

这是css:

.gradient {
    width: 20px;
    height: 20px;
    background: linear-gradient(to right, rgba(0,0,0,0) 0%, #fff 100%)
}

很简单。 在Chrome中,它运行良好,但在Firefox(34.0,Ubuntu 14.04)中,它的工作不正确: Firefox渐变截图

我尝试使用rgba(0,0,0,0)代替transparent ,尝试过-moz-linear-gradient前缀 - 没有结果。

dabblet链接

谢谢!


I've got a gradient div, here it is:

<div class="gradient"></div>

And here is css:

.gradient {
    width: 20px;
    height: 20px;
    background: linear-gradient(to right, rgba(0,0,0,0) 0%, #fff 100%)
}

Very simple. In Chrome it's works fine, but in Firefox (34.0, Ubuntu 14.04) it's work not correctly: Firefox gradient screenshot

I tried use rgba(0,0,0,0) instead transparent, tried -moz-linear-gradient prefix — no results.

dabblet link

Thanks!


原文:https://stackoverflow.com/questions/27917614
更新时间:2022-03-07 20:03

最满意答案

您可能需要做的是使用本机应用程序作为iOS附件和Web服务器之间的通信层。 换句话说,您将不得不拦截来自Web服务器的所有响应,并通过本机Objective-C转换为附件的响应。 如果您使用一个UIWebViewController视图控制器编写本机应用程序,并且让Web服务器在其响应消息中烘焙命令有效负载,或者严格解析嵌入式命令的HTML,则可以将其拉出。 我的公司以这种方式使用第三方配件,虽然它不漂亮但它的工作原理。 我的意思是“不漂亮”,因为你的命令对于你的应用程序构建和附件的底层处理是静态的。 祝你好运!

快速编辑:根据您希望与此附件进行接口的可重用性,您可以随时创建一个带有命令的框架。这样,当您需要更改或扩展命令/控制模式时,您所要做的就是更改框架(是的,这需要构建)。 它还允许您以快速的方式轻松地在多个应用程序中采用相同的控件。


What you're likely going to have to do is use a native app as a layer of communication between the iOS accessory and the web server. In other words you're going to have to intercept all of the responses from the web server and translate those for the accessory via native objective-C. If you write a native app with a viewcontroller that is a UIWebViewController and either have the web server bake in command payloads in its response messages or gruelingly parse the HTML for embedded commands you can pull it off. My company uses a 3rd party accessory in this manner and while it's not pretty it works. I mean "not pretty" in the sense that your commands are static per your app build and underlying handling of the accessory. Good luck!

Quick EDIT: Depending on how re-usable you want to make interfacing with this accessory you could always create a framework with the commands baked in. That way when you need to alter or expand the command/control schema all you have to do is change the framework (yes, that will require a build). It will also allow you to easily adopt the same control across multiple apps in a fast manner.

相关问答

更多
  • 您可能需要做的是使用本机应用程序作为iOS附件和Web服务器之间的通信层。 换句话说,您将不得不拦截来自Web服务器的所有响应,并通过本机Objective-C转换为附件的响应。 如果您使用一个UIWebViewController视图控制器编写本机应用程序,并且让Web服务器在其响应消息中烘焙命令有效负载,或者严格解析嵌入式命令的HTML,则可以将其拉出。 我的公司以这种方式使用第三方配件,虽然它不漂亮但它的工作原理。 我的意思是“不漂亮”,因为你的命令对于你的应用程序构建和附件的底层处理是静态的。 祝你 ...
  • 所以问题是认证协处理器上的接线错误,以及固件过时。 So the problem was the wiring on the authentication coprocessor being wrong, as well as the firmware out of date.
  • external-accessory背景模式适用于MFi配件,而不是BLE配件。 BLE( bluetooth-central和bluetooth-peripheral )有单独的核心蓝牙后台模式权利。 如果您声明MFi配件后台模式但您的应用程序未连接到外部MFi配件,那么您可能会拒绝您的应用程序。 这适用于App Store评论指南的第2.16节 2.16多任务应用程序只能将后台服务用于其预期目的:VoIP,音频播放,位置,任务完成,本地通知等。 The external-accessory backgr ...
  • 我认为宽度只是缩小 - 尝试宽度为60或70(故事板中UISwitch的默认宽度为79)。 I think you width is just to narrow -- try something like 60 or 70 for the width (the default width for a UISwitch in the storyboard is 79).
  • 是的,就像iPatel所说,EAAccessory仅适用于连接到iPad或iPod端口的设备和配件。 但是既然你说你已经通过WiFi连接到外部设备,听起来你需要做的就是找出一个可以通过它与这个设备通话的界面。 您可以通过HTTP或某种高级协议连接到设备,还是可以使用TCP或UDP与之通信? 如果可以,那么您只需完成将应用程序连接到外部WiFi连接设备即可。 Yes, like iPatel says, EAAccessory is only for devices & accessories that co ...
  • External Accessory框架的确适用于MFi,但您有两种选择: 越狱(我不能给你任何建议)。 改用CoreBluetooth 。 我在我自己的应用程序中使用了CoreBluetooth,它可以完成工作,具体取决于您要传输的数据量。 我不知道什么是optoserial设备,您需要多少数据,但我们正在有效地以字节为单位讨论数据传输。 CoreBluetooth运行蓝牙4.0 LE设备,现在是任何iOS设备在(包括)iPhone 4S之后发布的。 The External Accessory fram ...
  • 正如您所说,Android和iOS中的连接方式不同。 info.plist中定义的协议应该是您要与您拥有的特定蓝牙芯片一起使用的协议。 有一个指南解释如何在iOS中连接,您可能还应该检查它是哪个蓝牙版本。 如果它低于蓝牙4.0(BLE-蓝牙低功耗)或不低。 我认为它不是BLE,因为你提到它是MFI ...... 1)如果是BLE使用Core Bluetooth 2)否则请查看以下链接: Cocoa流编程指南简介 。 有点难以理解您对红色LED的意思,因为我们不知道您使用的是什么设备。 考虑到您从设备接收了一 ...
  • 是的,你不能用模拟器测试EADemo。 仅适用于实际设备。 Yeah, you can't test EADemo with the simulator. Only works with actual devices.
  • 我建议阅读EAAccessory的手册 ,因为它清楚地说明: 对于给定的附件对象,特定协议一次只允许一个会话。 所以,是的:只要协议不同,您就可以拥有多个会话。 如果不是,有什么阻止你使用第二个EAAccessory对象..? I recommend reading the manual for EAAccessory, as it clearly states: For a given accessory object, only one session at a time is allowed for ...
  • 这就是我目前的设置: 记录 - > @ - >我的webapp的IP CNAME - > awverify - > myapp.azurewebsites.net CNAME - > www - > myapp.azurewebsites.net 然后在我的azure域设置中,我添加了domain.com 希望这可以帮助 This is what I have in my current setup: A Record -> @ -> IP of my webapp CNAME -> awverify -> ...

相关文章

更多

最新问答

更多
  • 您如何使用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)