Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsIf an external stylesheet appears on the live page but its styles are missing from an html2canvas capture, first check whether the browser loaded the stylesheet and applied its rules to the target element. If the browser’s computed styles are correct, investigate what html2canvas can access in its cloned document and whether it supports the CSS properties in question. useCORS: true is for cross-origin images; it does not unlock cross-origin CSS rules or add support for CSS features html2canvas does not implement.
Why external CSS can disappear in an html2canvas capture
html2canvas does not take a native screenshot of the browser’s finished pixels. It reconstructs an image from the DOM and style information it can inspect, and its output can differ from the browser’s rendering. The project documents this rendering model and notes that CSS properties are implemented manually, so not every browser feature is reproduced (html2canvas FAQ; documentation on GitHub).
That means “external CSS is missing” can describe several different problems:
- The browser did not load or apply the stylesheet. The problem exists before html2canvas runs, for example because the URL, timing, selector, media condition, or cascade does not produce the expected computed style.
- The stylesheet loaded, but code cannot inspect its rules. Browser same-origin protections can prevent reading a cross-origin stylesheet’s
cssRules. This differs from whether the browser itself can display styles from the sheet. - The renderer cannot reproduce a property. A valid, applied CSS rule may use a feature html2canvas does not support or only partially supports.
- An image in the captured area failed to load or render. Image CORS settings may matter here, but that is separate from stylesheet access.
Identify which case you have before changing CORS options or rewriting styles.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Step 1: Confirm the browser loaded and applied the CSS
- Open DevTools and inspect Network. Reload the page and find the external stylesheet request. Check its status, requested URL, final URL after any redirects, and response contents. Confirm the expected rule is actually present.
- Inspect the target element. In the Elements panel, select the element html2canvas captures and check its computed styles. Look for the specific property and value you expect, not just the stylesheet filename.
- Check ordinary page CSS causes if the computed value is wrong. Verify the stylesheet URL and load timing, that the selector matches the target, that applicable media conditions are met, and that another rule is not winning in the cascade. Check the console and Network panel for load errors.
- Compare a small capture if the computed style is right. Capture only the affected element or a reduced test page. If the browser’s computed value is correct but the output differs, focus next on capture context, stylesheet access, and html2canvas’s support for that property.
The computed-style check is the key dividing line: when the browser itself does not apply the expected rule, fix the page first. When it does, the remaining issue is more likely to be the capture context or renderer support.
Step 2: Separate stylesheet CORS from image CORS
If the console shows a SecurityError while code tries to read cssRules, treat it as a stylesheet-inspection restriction. A page may display a cross-origin stylesheet while scripts remain unable to read its rule list. Setting html2canvas’s useCORS option or its proxy option does not grant permission to inspect foreign CSS rules. The documented uses of these options concern loading cross-origin images (FAQ; configuration; options).
An html2canvas issue report describes a cssRules error in Firefox and notes that a browser extension may inject a stylesheet in some circumstances. Treat that as one reported possibility, not a general explanation for every error (issue #2197).
To identify a sheet associated with the exception, inspect the stylesheets in the page. A cross-origin sheet may throw when its rules are read, so catch exceptions rather than letting the inspection stop at the first one:
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
for (const sheet of document.styleSheets) {
try {
console.log("Readable stylesheet:", sheet.href || "<style>", sheet.cssRules.length);
} catch (error) {
console.warn("Could not read stylesheet rules:", sheet.href, error.name, error.message);
}
}
This is a diagnostic aid, not a way to bypass browser security. If the error appears inconsistent, reproduce in a clean browser profile with extensions disabled and compare the result.
When the captured area contains remote images
For a remote image, useCORS: true can ask the browser to load it using CORS, but the image server must return an appropriate Access-Control-Allow-Origin response header. If it does not, configure an appropriate same-origin proxy instead. Neither approach makes a third-party stylesheet’s cssRules readable or remedies unsupported CSS (FAQ; official examples).
Step 3: Check whether html2canvas supports the missing property
If DevTools shows the expected computed style, no relevant load or security error explains the difference, and the capture still omits the effect, check the property against html2canvas’s supported features documentation. The project’s FAQ explains that CSS property support requires manual implementation and is incomplete. A browser supporting a property does not mean html2canvas can render it the same way (html2canvas FAQ).
- Reduce the case to a small element and only the styles needed to demonstrate the difference.
- Compare the browser’s computed value with the captured result.
- Look up the property and relevant value in the project’s supported features information; check for partial support as well as absent support.
- If the minimal case demonstrates a missing or incomplete feature, use the project’s suggested route: prepare a test case and open an issue.
Changing the stylesheet URL or adding useCORS will not implement a CSS feature that the renderer lacks. If an exact visual match is essential and html2canvas cannot reproduce the page, use a real browser screenshot workflow rather than treating html2canvas output as a pixel-perfect browser capture.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Step 4: Check redirects and installed-version behavior
Inspect the final URL and response headers for both the stylesheet and any images rather than assuming the original URL tells the whole story. A project issue reports an image URL that began same-origin and redirected to a CDN; in the implementation described, CORS setup depended on the original URL appearing cross-origin, so the redirect complicated image capture (issue #2892). This is a reported image-loading edge case, not proof that redirected CSS explains every missing-style problem.
Record the installed html2canvas version and verify behavior against that version. The configuration and behavior can differ over a project’s lifetime; a historical issue is evidence of a reported case, not a guaranteed fix for all current installations.
Quick diagnosis: which failure are you seeing?
| What you observe | Likely area to investigate | Next check |
|---|---|---|
| The expected value is missing in DevTools computed styles | Ordinary stylesheet loading or CSS application | Request status and final URL, rule contents, selector match, media conditions, timing, and cascade |
Computed styles are right; reading cssRules throws |
Stylesheet access restriction | Identify the sheet that throws; test without extensions if the source is unclear |
| Computed styles are right and no relevant access error appears, but one effect is absent | html2canvas property support or capture context | Check supported features and reduce to a minimal reproduction |
| A remote image is missing or taints/fails during capture | Image CORS or redirect behavior | Check final image URL and response headers; use CORS when allowed by the server, otherwise an appropriate proxy |
Troubleshooting common html2canvas CSS symptoms
The whole external stylesheet seems ignored
Start with the browser, not html2canvas options. If the stylesheet request failed or the target’s computed styles are wrong, repair the normal page path and rerun the capture. If the browser styles the page correctly, reduce the capture and test whether the missing properties are supported.
The page looks right, but the capture is partly wrong
Partial differences often point to one or more unsupported or incompletely supported properties rather than a stylesheet that failed wholesale. Identify the exact property-value pairs that differ and compare them with the supported features documentation. A minimal reproduction makes that distinction easier.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
The console reports a stylesheet cssRules SecurityError
Do not expect useCORS or proxy to remove this restriction. Determine which stylesheet access throws, and consider a clean profile if extensions might be injecting styles. The reported extension scenario is possible, not definitive.
A cross-origin image disappears even though the CSS works
Inspect the image request separately. For direct CORS loading, the image server must allow the requesting origin with an appropriate response header. Otherwise, use a proxy configured for the image. If the request redirects, inspect the final destination and test with the installed html2canvas version.
Changing the CSS URL or enabling CORS did not help
Return to the computed-style comparison. If the browser has the right value and the capture does not, test property support and capture context; if it does not, fix stylesheet loading or the cascade. The option’s name does not make it a general stylesheet CORS switch.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.When a browser screenshot API is the better fit
html2canvas is useful when you need a client-side reconstruction, but its output is not the browser’s final bitmap. If your requirement is to capture what a browser renders, ScreenshotNeo is a browser screenshot API and MCP server for developers. Its clean-shot flow accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Only clean shots are billed: bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and other MCP clients.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Or skip the browser setup
Make a GET request with the page URL to receive an image or PDF. Here is a cURL example that saves a WebP capture:
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for authentication and request options. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. AI agents can take screenshots through its MCP server. The Free plan includes 1,000 screenshots per month with no card, and paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.
Frequently Asked Questions
Does `useCORS: true` make html2canvas load external CSS?
No. It is relevant to cross-origin images when the image server permits CORS; it does not grant access to cross-origin stylesheet rules or add CSS feature support.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Can html2canvas guarantee the same pixels as the browser?
No. It reconstructs output from the DOM and style information it understands rather than capturing the browser’s finished pixels, so differences are possible.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

