首页 \ 问答 \ 控制台登录Javascript Office Addin(Console log in Javascript Office Addin)

控制台登录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
更新时间:2022-03-16 06:03

最满意答案

以下是我在代码中更改内容的简要说明:

  1. 三角形 clip-path: polygon(10% 0, 0 20%, 20% 20%)box-inner-1topleft调整为插图)

  2. 添加了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:

  1. Moved the triangle clip-path: polygon(10% 0, 0 20%, 20% 20%) to the box-inner-1 (adjusted top and left for illustration)

  2. Added an inset clip-path to the box-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 ...
  • 使用overflow:hidden为div。图像部分ouside div的部分将不可见
    Use overflow:hidd ...
  • 由于剪辑路径不受支持 ,为什么不使用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 ...
  • 我猜是这样的。 * { 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即可
    < ...
  • .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 ...

相关文章

更多

最新问答

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