控制台登录Javascript Office Addin(Console log in Javascript Office Addin)
我在Javascript Web Office Addins中有关于“console.log”的问题。 目前我正在使用Javascript Word Addin并且无法对其进行故障排除,因为我不明白“console.log”输出的发送位置。 在Microsoft站点上有很多示例,其中包含“console.log”,但它们从未指定如何检查这些输出。
所以,问题是如何看到这个“console.log”输出。 我没有使用Visual Studio。
BR,阿列克谢
I have a question about "console.log" in Javascript Web Office Addins. Currently I am working on Javascript Word Addin and can't troubleshoot it, because I don't understand where the "console.log" output is sent. On Microsoft site there are a lot of examples, that contain contain "console.log", but they never specify how to check these outputs.
So, the question is how can I see this "console.log" output. I am not using Visual Studio.
BR, Alexey
原文:https://stackoverflow.com/questions/37165316
最满意答案
以下是我在代码中更改内容的简要说明:
将三角形
clip-path: polygon(10% 0, 0 20%, 20% 20%)
到box-inner-1
(top
和left
调整为插图)添加了
box-inner-2
的插入clip-path
和剪切三角形的psuedo after元素。见下面的演示:
.wrapper { position: relative; height: 250px; width: 250px; border: 2px solid; } .wrapper:after { content: ''; clip-path: inset(0% 94% 0% 0%); background: #fff; display: block; height: 100%; } .box-inner-1 { position: absolute; top: 10px; left: 10px; right: 0; bottom: 0; background-color: red; clip-path: polygon(10% 0, 0 20%, 20% 20%); } .box-inner-2 { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: #fff; clip-path: inset(0% 0% 93% 0%); }
<div class="wrapper"> <div class="box-inner-1"></div> <div class="box-inner-2"></div> </div>
So here is a brief of what I changed in your code:
Moved the triangle
clip-path: polygon(10% 0, 0 20%, 20% 20%)
to thebox-inner-1
(adjustedtop
andleft
for illustration)Added an inset
clip-path
to thebox-inner-2
and a psuedo after element to clip the triangle.See demo below:
.wrapper { position: relative; height: 250px; width: 250px; border: 2px solid; } .wrapper:after { content: ''; clip-path: inset(0% 94% 0% 0%); background: #fff; display: block; height: 100%; } .box-inner-1 { position: absolute; top: 10px; left: 10px; right: 0; bottom: 0; background-color: red; clip-path: polygon(10% 0, 0 20%, 20% 20%); } .box-inner-2 { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: #fff; clip-path: inset(0% 0% 93% 0%); }
<div class="wrapper"> <div class="box-inner-1"></div> <div class="box-inner-2"></div> </div>
相关问答
更多-
以下是我在代码中更改内容的简要说明: 将三角形 clip-path: polygon(10% 0, 0 20%, 20% 20%)到box-inner-1 ( top和left调整为插图) 添加了box-inner-2的插入 clip-path和剪切三角形的psuedo after元素。 见下面的演示: .wrapper { position: relative; height: 250px; width: 250px; border: 2px solid; } .wrapp ...
-
Css剪切图像的右侧(Css cut right side of an image)[2023-06-26]
使用overflow:hidden为div。图像部分ouside div的部分将不可见Use overflow:hidd ... -
使用css裁剪图像(Crop image using css)[2023-08-22]
由于剪辑路径不受支持 ,为什么不使用overflow: hidden和容器元素? 这是您更新的JSFiddle演示此内容。 负边距可用于隐藏部分图像。 通过在另一侧使用负边距,可以轻松地从其他侧面裁剪图像。 仅当您需要非矩形剪切路径时,才必须使用注释中引用的SVG clipPath 。 示例小提琴 。 .rectshape { overflow: hidden; margin: 5px; border: 1px solid #000; } .rectshape > img { ... -
稍微改变一点: 使用display: block删除图像下方多余的内联间隙 用calc计算宽度10px。 移动图像现在可以以5px为增量进行 将图像粘贴到底部,用bottom: -5px切割图像bottom: -5px 将图像拉回10px的负值 用5px的边距拉出图像 喜欢这个: .inside{ display: block; position: relative; width: calc(100% + 10px); margin: -10px 0 0 -5px; bottom: -5 ...
-
至于我可以告诉问题不maskImage:withMask: 您发布的错误输出并不是错误的:image1的像素为黑色,image2不可见。 问题可能出现在您用来加载image和mask的函数中,或者用于生成图形输出的代码中。 其实在我看来,你得到了正确的输出,但使用了错误的颜色空间(没有alpha的灰度)。 检查您提供的参数image是否实际上采用RGBa格式,并且返回的UIImage是否未使用DeviceGray作为色彩空间绘制到其他CGContext 。 我想到的另一个可能的原因是你倒了image1和im ...
-
CSS中的图层蒙版(Layer masking in CSS)[2023-05-23]
我猜是这样的。 * { margin:0; padding: 0; } body { background: url('http://www.bestmanspeechestoasts.com/wp-content/themes/thesis/rotator/sample-4.jpg'); } p { padding: 0 10px; font-size: 12px; color:#fff; line-height: 1.3; overflow: hidden; } .outer { m ... -
你已经完全定位了img元素。 如果使figure (它们的父级)相对定位,则图像将在chrome中正确居中。 所以,只需更改figure的css即可 至
-
jQuery图像屏蔽/定位(jQuery image masking/positioning)[2021-12-25]
.offset()是相对于页面而不是容器。 你想使用.position() 。 这是.offset()手册页中的相关位: .offset()方法允许我们检索元素相对于文档的当前位置。 将此与[.position()](http://api.jquery.com/position/)进行对比,后者检索相对于偏移父项的当前位置。 .offset() is relative to the page, not to the container. You want to use .position(). Here's ... -
设置clippath多边形时,不限于凸形。 如果你指定
这将绘制一个外部三角形(与你的相同),然后进入它并切割另一个三角形。 更新小提琴 如果你这样做的话,你只需要记住在对开三角形中绘制内部三角形 编辑 是的,你可以剪辑一个剪辑。 查看此更新的演示 CSS是 -
将剪辑应用于CSS中的元素是clip-path 例如: .element { clip-path: inset(10px 20px 30px 40px); /* Also can take single values to make all sides the same, or 2 values (vert/horz), or 3 values (top/horz/bottom). */ } Codepen示例: 这里 。 Applying clipping to elements in CSS is c ...