首页 \ 问答 \ SVG Circle Scaling(SVG Circle Scaling)

SVG Circle Scaling(SVG Circle Scaling)

我有一个简单的SVG圈子:

<svg version="1.1"
 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
 x="0px" y="0px" width="100px" height="100px" viewBox="0 0 100 100" overflow="visible" enable-background="new 0 0 100 100"
 xml:space="preserve">
<circle fill="#6E6F6F" cx="50" cy="50" r="49"/>
</svg>

此图像用作背景,并调整为22px:

background: transparent url('++resource++svg/star_neg.svg') no-repeat 0 0 / 22px 22px;

当我在浏览器中查看此内容时,圆圈的右侧和底侧在Firefox中显得平坦(Chrome看起来很好)。 如果我放大Firefox,圆圈将按预期显示完整。 我怎样才能解决这个问题?


I have a simple SVG circle:

<svg version="1.1"
 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
 x="0px" y="0px" width="100px" height="100px" viewBox="0 0 100 100" overflow="visible" enable-background="new 0 0 100 100"
 xml:space="preserve">
<circle fill="#6E6F6F" cx="50" cy="50" r="49"/>
</svg>

This image is being used as a background, and resized to 22px:

background: transparent url('++resource++svg/star_neg.svg') no-repeat 0 0 / 22px 22px;

When I view this in the browser, the right and bottom sides of the circle appear flat in Firefox (Chrome looks fine). If I zoom in on Firefox, the circle appears complete as expected. How can I fix this?


原文:https://stackoverflow.com/questions/22483622
更新时间:2022-04-28 07:04

最满意答案

试试这个(调整以引用适当的东西):

这个想法是......使用row_number()来获得每个产品最多5个评论。 然后转动结果,然后执行左连接以获取产品详细信息(包括那些没有任何评论的产品详细信息)。

with top5reviews as 
(
select * 
from
(
select 
  productid, review
  , row_number() over (partition by productid order by reviewid) as reviewnum
from reviews
) r
where reviewnum <= 5
)
, pivotted as
(
select productid, [1] as review1, [2] as review2, [3] as review3, [4] as review4, [5] as review5
from top5reviews r
 pivot
 (max(review) for reviewnum in ([1],[2],[3],[4],[5])) p
)
select *
from products p
  left join
  pivotted r
  on p.productid = r.productid

Try this (tweaked to refer to the appropriate things):

The idea is... use row_number() to get up to 5 reviews out per product. Then pivot the results, and then do a left join to get product details (including those that don't have any reviews).

with top5reviews as 
(
select * 
from
(
select 
  productid, review
  , row_number() over (partition by productid order by reviewid) as reviewnum
from reviews
) r
where reviewnum <= 5
)
, pivotted as
(
select productid, [1] as review1, [2] as review2, [3] as review3, [4] as review4, [5] as review5
from top5reviews r
 pivot
 (max(review) for reviewnum in ([1],[2],[3],[4],[5])) p
)
select *
from products p
  left join
  pivotted r
  on p.productid = r.productid

相关问答

更多
  • 另一种选择是PIVOT与Row_Number()一致 例 Select * From ( Select Month ,City ,Col = concat('TopCity',Row_Number() over (Partition By Month Order By [# Of Accidents] Desc) ) From YourTable ) Src Pivot (max(City) for ...
  • 更新2: 请参阅@ jpillora的评论。 这可能与更新1最相关。 我刚刚尝试了产品广告API(截至2014-09-17),似乎此API仅返回一个指向仅包含评论的iframe的网址。 我想你必须屏蔽刮 - 虽然我想像会破坏亚马逊的TOS。 更新1: 也许。 我之前写了原来的答案。 我现在没有时间研究这个问题,因为我不再是一个关于亚马逊评论的项目,但是他们在“ 产品广告API ”中的网页则表示“产品广告API可以帮助您使用产品搜索和查找来向Amazon产品做广告能力,产品信息和功能,如客户评价...“截至2 ...
  • 您需要使用能够删除特定评论的控制器创建您自己的模块。 首先,请查看管理员可以删除评论的管理员是如何完成此操作的。 您可以使用layout xml向用户区添加新的“我的评论”部分。 当用户单击它时,您应该在控制器中使用indexAction来呈现会话中属于该用户的所有评论。 这肯定需要相当多的自定义编码经验。 You need to create your own module with a controller which is able to delete specific reviews. To sta ...
  • 试试这个报告吧: //Build the report var report = (from pr in providerRiskLevels join nc in newCodes on pr.Provider.ProviderId equals nc.ProviderId where pr.RiskCategoryId == RiskCategoryIds.VisibleRisk && filterRiskLevelNums.Contains(pr.RiskLev ...
  • 试试这个(调整以引用适当的东西): 这个想法是......使用row_number()来获得每个产品最多5个评论。 然后转动结果,然后执行左连接以获取产品详细信息(包括那些没有任何评论的产品详细信息)。 with top5reviews as ( select * from ( select productid, review , row_number() over (partition by productid order by reviewid) as reviewnum from rev ...
  • 这是你在找什么? SELECT Walmart_ShippedItems = MAX(CASE WHEN t.store = 'Walmart' THEN t.ShippedItems END), Walmart_ReturnedItems = MAX(CASE WHEN t.store = 'Walmart' THEN t.ReturnedItems END), Lowes_ShippedItems = MAX(CASE WHEN t.store = 'Lowes' THEN t ...
  • 由于您可能在查询中选择了COUNT('review_id') ,因此您最后只需添加ORDER BY COUNT('review_id') DESC 。 Since you're presumably selecting COUNT('review_id') in your query, you can simply add ORDER BY COUNT('review_id') DESC at the end.
  • 查看完源代码后。 您似乎没有在数据库中保存产品和评论之间的任何关联。 您将要将产品_id存储在审阅对象的某个位置。 完成后,您将能够在模板中按productId过滤评论。 我在下面写了一些示例代码。 add_review.js Template.add_review.events({ 'submit .add_review':function(event){ var rating = event.target.rating.value; var body = even ...
  • 您目前希望导入的评论格式是什么? 看来你需要扩展这个脚本,例如:打开一个包含你的评论的文件,循环浏览它们并在这个循环中使用上面的代码,用实际的评论信息替换“title”和“detail”等。 根据您的评论编辑* **** 我假设你有PHP和Magento编码经验 - 如果没有,也许你应该寻求开发人员的帮助。

相关文章

更多

最新问答

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